sshado / Aphelion-Code

The code for Baystation12's branch of SS13
http://baystation12.net/
Other
4 stars 8 forks source link

Double AI Spawn during Malfunction. #190

Open sshado opened 8 years ago

sshado commented 8 years ago

When a malfunction AI is spawned as part of round start, another player is able to join as an AI player after everyone has spawned. The second AI is not malfunction, and spawns right on top of the original AI. Players should not be able to do this!

ghost commented 8 years ago

The proc that appears to be causing this is /hook/roundstart/proc/spawn_empty_ai(). It is located in code\modules\mob\living\silicon\ai\latejoin.dm I believe it is not checking to see if an AI was spawned by the malf game mode before spawning another empty core.

BlueNexus commented 8 years ago

Working on it.

BlueNexus commented 8 years ago

Should be fixed in #196

ghost commented 8 years ago

Oh you beat me to the punch. I'll snag your branch and test it like you asked on gitter.

ghost commented 8 years ago

That fix is a no go. While it stops the AI core from spawning during malf, it also stops if from spawning during any other game mode.

BlueNexus commented 8 years ago

...What? That doesn't make any sense. It should only return 0 when the gamemode is malfunction. Huh.

ghost commented 8 years ago

After checking I can confirm that this currently exists in baycode as well.

ghost commented 8 years ago

Oh my apologies I had the results from your attempt and mine swapped. This edit here still allows the extra core to spawn during malf. My own attempt (259edfad991eaf1b2d3f014c31b5f38e8d7c7e56) ended with the removal of the core in all situations.