mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-10-19 11:42:39 +00:00
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
d3b4e1c794
commit
0fc5f0d768
1 changed files with 4 additions and 3 deletions
|
@ -170,12 +170,13 @@ 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)
|
||||
if (currentObj->oWaterRingMgrNextRingIndex >= 10001) {
|
||||
currentObj->oWaterRingMgrNextRingIndex = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void bhv_jet_stream_ring_spawner_loop(void) {
|
||||
if (!network_sync_object_initialized(o)) {
|
||||
|
|
Loading…
Reference in a new issue