Saving -- Starting new maps not e1m1a and reloading the save may start with no weapon and a crash if attempting to fire

Issue #155 resolved
Frank Sapone created an issue

This bug appears to be introduced after caedes overhaul of the save system but an easy way to reproduce this bug is:

Open DK Bring down console, type "map e1dm2a" Go back to main menu, load the auto-save. The disruptor weapon will be missing and attempting to fire will crash the game.

You can actually press "1" to reselect the distuptor and the crash will be avoided.

This can happen on loading some SP maps by manually invoking the "map <mapname>" command. I don't remember all which ones but e4m6c it seems like it has 50/50 chance of occuring.

Comments (1)

  1. Frank Sapone reporter

    In single player reset attack_finished or sometimes its greater than gstate->time by a few MS on auto-save reload. This is a problem because WeaponSelect will run the check to see if we're still in an attack state and then check to see if we already have the current weapon selected. This will all be true, and it will return. Leaving us with no weapon and the game will crash as soon as you try to fire.

    So, reset attack_finished to 0.0f on single player maps after ClientBegin is finished placing you in the server.

  2. Log in to comment