mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-23 12:22:45 +00:00
fbf8084999
- fixed PARAM_ACTION_PROLOGUE to assign correct types to the implicit pointers. It gave the actual class to the wrong one, which until now did not matter because all functions were using 'Actor', regardless of actual class association. - fixed the definition of IceChunk and removed some redundant code here. Since A_FreezeDeathChunks already calls SetState, which in turn calls the state's action function, there is no need to call it again explicitly.
73 lines
1 KiB
Text
73 lines
1 KiB
Text
|
|
|
|
//==========================================================================
|
|
//
|
|
// Ice chunk
|
|
//
|
|
//==========================================================================
|
|
|
|
class IceChunk : Actor
|
|
{
|
|
Default
|
|
{
|
|
Radius 3;
|
|
Height 4;
|
|
Mass 5;
|
|
Gravity 0.125;
|
|
+DROPOFF
|
|
+CANNOTPUSH
|
|
+FLOORCLIP
|
|
+NOTELEPORT
|
|
+NOBLOCKMAP
|
|
+MOVEWITHSECTOR
|
|
}
|
|
|
|
void A_IceSetTics ()
|
|
{
|
|
tics = 70 + (random[IceTics]() & 63);
|
|
Name dtype = GetFloorTerrain().DamageMOD;
|
|
if (dtype == 'Fire')
|
|
{
|
|
tics >>= 2;
|
|
}
|
|
else if (dtype == 'Ice')
|
|
{
|
|
tics <<= 1;
|
|
}
|
|
}
|
|
|
|
States
|
|
{
|
|
Spawn:
|
|
ICEC ABCD 10 A_IceSetTics;
|
|
Stop;
|
|
}
|
|
}
|
|
|
|
//==========================================================================
|
|
//
|
|
// A chunk of ice that is also a player
|
|
//
|
|
//==========================================================================
|
|
|
|
class IceChunkHead : PlayerChunk
|
|
{
|
|
Default
|
|
{
|
|
Radius 3;
|
|
Height 4;
|
|
Mass 5;
|
|
Gravity 0.125;
|
|
DamageType "Ice";
|
|
+DROPOFF
|
|
+CANNOTPUSH
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
ICEC A 0;
|
|
ICEC A 10 A_CheckPlayerDone;
|
|
wait;
|
|
}
|
|
}
|
|
|