Zero-K icon indicating copy to clipboard operation
Zero-K copied to clipboard

Grizzley Bug

Open ArchShaman opened this issue 12 years ago • 4 comments

There's a long standing bug with Grizzley being able to crash a game. If a grizzley's muzzle clips thru a unit (its hit box?) it will kill it instantly. If that unit happens to be an enemy unit, it will crash the game without any error and infolog abruptly ends.

Here's a replay (i believe this is the right one) https://www.dropbox.com/s/5sjxdry85as02m3/20140915_082102_FinnsRevengeRV4_91.sdf?dl=0 -- note when my halberds swarm the grizzley and it starts to come up, it crashes the game. Infolog of event: http://pastebin.com/LUAVW8Ff

It seems more likely to occur in the water than on land.

ArchShaman avatar Sep 15 '14 16:09 ArchShaman

After looking at the Grizzly script, I found the suspicious line of code: https://github.com/ZeroK-RTS/Zero-K/blob/master/scripts/amphassault.lua#L299 Spring.SetUnitWeaponState(unitID, 1, "range", 0)

I think setting 0 as range may cause some division by 0 crash in the engine, I will investigate it.

CarabusX avatar Sep 15 '14 16:09 CarabusX

Important Note: that this crash only occurs with enemies getting insta'd and not allies.

ArchShaman avatar Sep 15 '14 17:09 ArchShaman

Tested the replay, the crash happens at 24:58 when the Grizzly is about to shoot the 3rd time, while having a ball of Halberds above it.

CarabusX avatar Sep 15 '14 17:09 CarabusX

PR #245 fixes the crash. No idea about the Grizzly behaviour regarding shooting inside allied units.

CarabusX avatar Sep 15 '14 19:09 CarabusX