Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions TheForceEngine/TFE_DarkForces/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ namespace TFE_DarkForces
// TFE
void player_warp(const ConsoleArgList& args);
void player_sector(const ConsoleArgList& args);
JBool player_hasWeapon(s32 weapon);

///////////////////////////////////////////
// API Implentation
Expand Down Expand Up @@ -808,6 +809,19 @@ namespace TFE_DarkForces
disableNightVision();
hud_clearMessage();
}

// Don't start the game with a weapon you don't have after overrides.
if (!player_hasWeapon(s_playerInfo.curWeapon + 1))
{
if (s_playerInfo.itemPistol)
{
s_playerInfo.curWeapon = WPN_PISTOL;
}
else
{
s_playerInfo.curWeapon = WPN_FIST;
}
}
}

void player_createController(JBool clearData)
Expand Down