mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-19 07:01:09 +00:00
Small fixes (#910)
* Fix potential index out of bounds * Fix potential index out of bounds * Use 'MAXGEOSECTORS' instead of magic constant
This commit is contained in:
parent
52ea497b50
commit
cebab8f85d
2 changed files with 2 additions and 2 deletions
|
@ -101,7 +101,7 @@ bool GameInterface::StartGame(FNewGameStartup& gs)
|
||||||
|
|
||||||
static const uint16_t sounds_d[] = { JIBBED_ACTOR6, BONUS_SPEECH1, DUKE_GETWEAPON2, JIBBED_ACTOR5, JIBBED_ACTOR5 };
|
static const uint16_t sounds_d[] = { JIBBED_ACTOR6, BONUS_SPEECH1, DUKE_GETWEAPON2, JIBBED_ACTOR5, JIBBED_ACTOR5 };
|
||||||
static const uint16_t sounds_r[] = { 427, 428, 196, 195, 197 };
|
static const uint16_t sounds_r[] = { 427, 428, 196, 195, 197 };
|
||||||
if (gs.Skill >=0 && gs.Skill <= 5) skillsound = isRR()? sounds_r[gs.Skill] : sounds_d[gs.Skill];
|
if (gs.Skill >=0 && gs.Skill < 5) skillsound = isRR()? sounds_r[gs.Skill] : sounds_d[gs.Skill];
|
||||||
|
|
||||||
if (menu_sounds && skillsound >= 0 && SoundEnabled() && !netgame)
|
if (menu_sounds && skillsound >= 0 && SoundEnabled() && !netgame)
|
||||||
{
|
{
|
||||||
|
|
|
@ -528,7 +528,7 @@ void prelevel_r(int g, TArray<DDukeActor*>& actors)
|
||||||
if (!actor->exists()) continue;
|
if (!actor->exists()) continue;
|
||||||
if (actor->GetClass()->TypeName == NAME_RedneckGeometryEffect)
|
if (actor->GetClass()->TypeName == NAME_RedneckGeometryEffect)
|
||||||
{
|
{
|
||||||
if (geocnt > 64)
|
if (geocnt >= MAXGEOSECTORS)
|
||||||
I_Error("Too many geometry effects");
|
I_Error("Too many geometry effects");
|
||||||
if (actor->spr.hitag == 0)
|
if (actor->spr.hitag == 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue