- No weapon fix

I just forget to set default values
This commit is contained in:
Grind Core 2019-10-27 22:16:53 +03:00 committed by Christoph Oelckers
parent 0f2c4f7760
commit d79c45584a
3 changed files with 8 additions and 8 deletions

View file

@ -2551,12 +2551,6 @@ void actInit(bool bSaveLoad) {
// reset counters
gProxySpritesCount = gSightSpritesCount = gPhysSpritesCount = 0;
// reset qav player index
for (int i = 0; i < kMaxPlayers; i++) {
gQavScene[i].index = -1;
gQavScene[i].qavId = NULL;
}
// fill arrays with negative values to avoid xvel 0 situation
memset(gSightSpritesList, -1, sizeof(gSightSpritesList));
memset(gProxySpritesList, -1, sizeof(gProxySpritesList));

View file

@ -898,6 +898,12 @@ void playerStart(int nPlayer)
PLAYER* pPlayer = &gPlayer[nPlayer];
GINPUT* pInput = &pPlayer->input;
ZONE* pStartZone = NULL;
// reset qav player index
if (gModernMap) {
gQavScene[pPlayer->nPlayer].index = -1;
gQavScene[pPlayer->nPlayer].qavId = NULL;
}
// normal start position
if (gGameOptions.nGameType <= 1)

View file

@ -212,8 +212,8 @@ struct POWERUPINFO {
struct QAVSCENE {
short index;
QAV* qavId;
short index = -1;
QAV* qavId = NULL;
};
extern QAVSCENE gQavScene[kMaxPlayers];