Set object lifeleft to IMMORTAL_TIME if the byte read in demo playback is -1. This allows the objects to stay when playing a demo, going to the editor then playing the game from the editor
This commit is contained in:
parent
7ff82427d9
commit
670219fa5a
|
@ -5,6 +5,7 @@ D1X-Rebirth Changelog
|
||||||
main/gameseq.c: Allow level progressing if playing the builtin mission with EDITOR compiled - only exit if Current_level_num is 0
|
main/gameseq.c: Allow level progressing if playing the builtin mission with EDITOR compiled - only exit if Current_level_num is 0
|
||||||
editor/med.c: Reset the player object for the editor, since demo playback mucks it up
|
editor/med.c: Reset the player object for the editor, since demo playback mucks it up
|
||||||
main/render.c: Skip rendering of OBJ_NONE objects to avoid a failed Assert (can happen when playing a demo then going to the editor)
|
main/render.c: Skip rendering of OBJ_NONE objects to avoid a failed Assert (can happen when playing a demo then going to the editor)
|
||||||
|
main/newdemo.c: Set object lifeleft to IMMORTAL_TIME if the byte read in demo playback is -1. This allows the objects to stay when playing a demo, going to the editor then playing the game from the editor
|
||||||
|
|
||||||
20120416
|
20120416
|
||||||
--------
|
--------
|
||||||
|
|
|
@ -518,10 +518,13 @@ void nd_read_object(object *obj)
|
||||||
else {
|
else {
|
||||||
sbyte b;
|
sbyte b;
|
||||||
|
|
||||||
|
// MWA old way -- won't work with big endian machines nd_read_byte((ubyte *)&(obj->lifeleft));
|
||||||
nd_read_byte(&b);
|
nd_read_byte(&b);
|
||||||
obj->lifeleft = (fix)b;
|
obj->lifeleft = (fix)b;
|
||||||
// MWA old way -- won't work with big endian machines nd_read_byte((ubyte *)&(obj->lifeleft));
|
if (obj->lifeleft == -1)
|
||||||
obj->lifeleft = (fix)((int)obj->lifeleft << 12);
|
obj->lifeleft = IMMORTAL_TIME;
|
||||||
|
else
|
||||||
|
obj->lifeleft = (fix)((int)obj->lifeleft << 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((obj->type == OBJ_ROBOT) && !shareware) {
|
if ((obj->type == OBJ_ROBOT) && !shareware) {
|
||||||
|
|
Loading…
Reference in a new issue