You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an alien slave's beams exist and the slave is in a transition volume when a changelevel occurs, the slave will transition to the next map but the beams will not.
So in the next map the slave's beam pointers will be null. When you then transition back to the previous map the beams that still exist there won't be patched up to the slave because the pointers are null now, and the beams will remain forever.
Repeatedly going between transitions while a slave's beams exist will eventually cause the game to run out of edict slots and exit with a fatal error.
To fix this the beams need to be set to be temporary:
m_pBeam[m_iBeams]->pev->spawnflags |= SF_BEAM_TEMPORARY; // Flag these to be destroyed on save/restore or level transition
This will also cause the beams to disappear if you save during an attack and then load it again. The actual attack still occurs, it's just the beam effects that will disappear.
The text was updated successfully, but these errors were encountered:
SamVanheer
changed the title
Alien slave beams are stay forever if they exist during a level change
Alien slave beams stay forever if they exist during a level change
May 6, 2021
SamVanheer
added a commit
to twhl-community/halflife-updated
that referenced
this issue
Apr 2, 2023
If an alien slave's beams exist and the slave is in a transition volume when a changelevel occurs, the slave will transition to the next map but the beams will not.
Beams are set to never transition:
halflife/dlls/effects.h
Lines 107 to 113 in c7240b9
So in the next map the slave's beam pointers will be null. When you then transition back to the previous map the beams that still exist there won't be patched up to the slave because the pointers are null now, and the beams will remain forever.
Repeatedly going between transitions while a slave's beams exist will eventually cause the game to run out of edict slots and exit with a fatal error.
To fix this the beams need to be set to be temporary:
m_pBeam[m_iBeams]->pev->spawnflags |= SF_BEAM_TEMPORARY; // Flag these to be destroyed on save/restore or level transition
This needs to be done in 3 places:
halflife/dlls/islave.cpp
Line 761 in c7240b9
halflife/dlls/islave.cpp
Line 807 in c7240b9
halflife/dlls/islave.cpp
Line 837 in c7240b9
This will also cause the beams to disappear if you save during an attack and then load it again. The actual attack still occurs, it's just the beam effects that will disappear.
The text was updated successfully, but these errors were encountered: