Skip to content

Commit

Permalink
[JASP JACoders#757]. Fix crash when user loads a saved game were they…
Browse files Browse the repository at this point in the history
… spawned a vehicle in the console.
  • Loading branch information
jolovin committed Jan 17, 2021
1 parent d2ed03a commit 6670d30
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions code/game/g_savegame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1147,6 +1147,9 @@ static void ReadGEntities(qboolean qbAutosave)
{
Vehicle_t tempVehicle;

// initialize the vehicle cache g_vehicleInfo
int vehicleIndex = BG_VehicleGetIndex(pEnt->NPC_type);

EvaluateFields(savefields_gVHIC, &tempVehicle,(byte *)pEntOriginal->m_pVehicle, INT_ID('V','H','I','C'));

// so can we pinch the original's one or do we have to alloc a new one?...
Expand Down

0 comments on commit 6670d30

Please sign in to comment.