From d79c45584a48a64e326f0250ba173f5ee0f44c1c Mon Sep 17 00:00:00 2001 From: Grind Core Date: Sun, 27 Oct 2019 22:16:53 +0300 Subject: [PATCH] - No weapon fix I just forget to set default values --- source/blood/src/actor.cpp | 6 ------ source/blood/src/player.cpp | 6 ++++++ source/blood/src/player.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/source/blood/src/actor.cpp b/source/blood/src/actor.cpp index 3f54469b8..829a34a35 100644 --- a/source/blood/src/actor.cpp +++ b/source/blood/src/actor.cpp @@ -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)); diff --git a/source/blood/src/player.cpp b/source/blood/src/player.cpp index f870260a3..57ba93c81 100644 --- a/source/blood/src/player.cpp +++ b/source/blood/src/player.cpp @@ -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) diff --git a/source/blood/src/player.h b/source/blood/src/player.h index 492ce5196..378ad611d 100644 --- a/source/blood/src/player.h +++ b/source/blood/src/player.h @@ -212,8 +212,8 @@ struct POWERUPINFO { struct QAVSCENE { - short index; - QAV* qavId; + short index = -1; + QAV* qavId = NULL; }; extern QAVSCENE gQavScene[kMaxPlayers];