Proper NULL check for this in water_ring.c
The water ring index should NOT increment if a water ring fails to spawn.
This commit is contained in:
parent
f11184b8df
commit
26f7e76c02
|
@ -170,10 +170,11 @@ void water_ring_spawner_act_inactive(void) {
|
|||
waterRing = spawn_object(o, MODEL_WATER_RING, bhvJetStreamWaterRing);
|
||||
if (waterRing != NULL) {
|
||||
waterRing->oWaterRingIndex = currentObj->oWaterRingMgrNextRingIndex;
|
||||
currentObj->oWaterRingMgrNextRingIndex++;
|
||||
if (currentObj->oWaterRingMgrNextRingIndex >= 10001) {
|
||||
currentObj->oWaterRingMgrNextRingIndex = 0;
|
||||
}
|
||||
}
|
||||
currentObj->oWaterRingMgrNextRingIndex++;
|
||||
if (currentObj->oWaterRingMgrNextRingIndex >= 10001)
|
||||
currentObj->oWaterRingMgrNextRingIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue