Compare commits

...
Author SHA1 Message Date
Alug 4f0cf44e78 Merge branch 'unnestmothink' into fixgnu23 2025-07-27 18:15:31 +02:00
Alug 2417647110 Merge branch 'Saturn-Next' into fixgnu23 2025-07-27 18:15:04 +02:00
Alug efc4a513ce Merge branch 'Saturn-Next' into fixgnu23 2025-07-20 17:02:31 +02:00
Alug 515c18c855 Merge remote-tracking branch 'origin/Saturn-Next' into fixgnu23 2025-06-19 15:55:58 +02:00
Alug 58de672915 add comment 2025-05-29 15:31:32 +02:00
Alug 16b5037486 dont use stdbool´s bool type
this badly breaks everything
apparently the code assumes boolean to be an interger type or some shit
2025-05-29 12:41:45 +01:00
Alug bcec8b98f7 make the game c23 compatible properly
+ some cleanup and removal of some redundant checks
2025-05-28 18:25:07 +02:00
31 changed files with 8323 additions and 4304 deletions

No files matched your search

+1
View File
@@ -324,6 +324,7 @@ static void AM_initVariables(void)
m_x = (plr->mo->x >> FRACTOMAPBITS) - m_w/2;
m_y = (plr->mo->y >> FRACTOMAPBITS) - m_h/2;
}
AM_changeWindowLoc();
// for saving & restoring
+6 -2
View File
@@ -2110,14 +2110,18 @@ INT32 D_LookupPlayer(const char *s)
static INT32 FindPlayerByPlace(INT32 place)
{
INT32 playernum;
for (playernum = 0; playernum < MAXPLAYERS; ++playernum)
if (playeringame[playernum])
{
if (!playeringame[playernum])
continue;
if (players[playernum].kartstuff[k_position] == place)
{
return playernum;
}
}
return -1;
}
@@ -5674,7 +5678,7 @@ static void Command_Archivetest_f(void)
// assign mobjnum
i = 1;
for (th = thinkercap.next; th != &thinkercap; th = th->next)
if (th->function.acp1 == (actionf_p1)P_MobjThinker)
if (th->function == (actionf_p1)P_MobjThinker)
((mobj_t *)th)->mobjnum = i++;
// allocate buffer
+1 -8
View File
@@ -28,18 +28,11 @@
// To compile this as "ANSI C with classes" we will need to handle the various
// action functions cleanly.
//
typedef void (*actionf_v)();
typedef void (*actionf_p1)(void *);
typedef union
{
actionf_v acv;
actionf_p1 acp1;
} actionf_t;
// Historically, "think_t" is yet another function pointer to a routine
// to handle an actor.
typedef actionf_t think_t;
typedef actionf_p1 think_t;
// Doubly linked list of actors.
typedef struct thinker_s
+218 -217
View File
@@ -1416,211 +1416,212 @@ static void readhuditem(MYFILE *f, INT32 num)
// DO NOT FORGET TO SYNC THIS LIST WITH THE ACTIONNUM ENUM IN INFO.H
actionpointer_t actionpointers[] =
{
{{A_Explode}, "A_EXPLODE"},
{{A_Pain}, "A_PAIN"},
{{A_Fall}, "A_FALL"},
{{A_MonitorPop}, "A_MONITORPOP"},
{{A_Look}, "A_LOOK"},
{{A_Chase}, "A_CHASE"},
{{A_FaceStabChase}, "A_FACESTABCHASE"},
{{A_FaceTarget}, "A_FACETARGET"},
{{A_FaceTracer}, "A_FACETRACER"},
{{A_Scream}, "A_SCREAM"},
{{A_BossDeath}, "A_BOSSDEATH"},
{{A_CustomPower}, "A_CUSTOMPOWER"},
{{A_GiveWeapon}, "A_GIVEWEAPON"},
{{A_RingShield}, "A_RINGSHIELD"},
{{A_RingBox}, "A_RINGBOX"},
{{A_Invincibility}, "A_INVINCIBILITY"},
{{A_SuperSneakers}, "A_SUPERSNEAKERS"},
{{A_BunnyHop}, "A_BUNNYHOP"},
{{A_BubbleSpawn}, "A_BUBBLESPAWN"},
{{A_FanBubbleSpawn}, "A_FANBUBBLESPAWN"},
{{A_BubbleRise}, "A_BUBBLERISE"},
{{A_BubbleCheck}, "A_BUBBLECHECK"},
{{A_AwardScore}, "A_AWARDSCORE"},
{{A_ExtraLife}, "A_EXTRALIFE"},
{{A_BombShield}, "A_BOMBSHIELD"},
{{A_JumpShield}, "A_JUMPSHIELD"},
{{A_WaterShield}, "A_WATERSHIELD"},
{{A_ForceShield}, "A_FORCESHIELD"},
{{A_PityShield}, "A_PITYSHIELD"},
{{A_GravityBox}, "A_GRAVITYBOX"},
{{A_ScoreRise}, "A_SCORERISE"},
{{A_ParticleSpawn}, "A_PARTICLESPAWN"},
{{A_AttractChase}, "A_ATTRACTCHASE"},
{{A_DropMine}, "A_DROPMINE"},
{{A_FishJump}, "A_FISHJUMP"},
{{A_ThrownRing}, "A_THROWNRING"},
{{A_GrenadeRing}, "A_GRENADERING"}, // SRB2kart
{{A_SetSolidSteam}, "A_SETSOLIDSTEAM"},
{{A_UnsetSolidSteam}, "A_UNSETSOLIDSTEAM"},
{{A_SignPlayer}, "A_SIGNPLAYER"},
{{A_OverlayThink}, "A_OVERLAYTHINK"},
{{A_JetChase}, "A_JETCHASE"},
{{A_JetbThink}, "A_JETBTHINK"},
{{A_JetgThink}, "A_JETGTHINK"},
{{A_JetgShoot}, "A_JETGSHOOT"},
{{A_ShootBullet}, "A_SHOOTBULLET"},
{{A_MinusDigging}, "A_MINUSDIGGING"},
{{A_MinusPopup}, "A_MINUSPOPUP"},
{{A_MinusCheck}, "A_MINUSCHECK"},
{{A_ChickenCheck}, "A_CHICKENCHECK"},
{{A_MouseThink}, "A_MOUSETHINK"},
{{A_DetonChase}, "A_DETONCHASE"},
{{A_CapeChase}, "A_CAPECHASE"},
{{A_RotateSpikeBall}, "A_ROTATESPIKEBALL"},
{{A_SlingAppear}, "A_SLINGAPPEAR"},
{{A_MaceRotate}, "A_MACEROTATE"},
{{A_UnidusBall}, "A_UNIDUSBALL"},
{{A_RockSpawn}, "A_ROCKSPAWN"},
{{A_SetFuse}, "A_SETFUSE"},
{{A_CrawlaCommanderThink}, "A_CRAWLACOMMANDERTHINK"},
{{A_SmokeTrailer}, "A_SMOKETRAILER"},
{{A_RingExplode}, "A_RINGEXPLODE"},
{{A_OldRingExplode}, "A_OLDRINGEXPLODE"},
{{A_MixUp}, "A_MIXUP"},
{{A_RecyclePowers}, "A_RECYCLEPOWERS"},
{{A_Boss1Chase}, "A_BOSS1CHASE"},
{{A_FocusTarget}, "A_FOCUSTARGET"},
{{A_Boss2Chase}, "A_BOSS2CHASE"},
{{A_Boss2Pogo}, "A_BOSS2POGO"},
{{A_BossZoom}, "A_BOSSZOOM"},
{{A_BossScream}, "A_BOSSSCREAM"},
{{A_Boss2TakeDamage}, "A_BOSS2TAKEDAMAGE"},
{{A_Boss7Chase}, "A_BOSS7CHASE"},
{{A_GoopSplat}, "A_GOOPSPLAT"},
{{A_Boss2PogoSFX}, "A_BOSS2POGOSFX"},
{{A_Boss2PogoTarget}, "A_BOSS2POGOTARGET"},
{{A_BossJetFume}, "A_BOSSJETFUME"},
{{A_EggmanBox}, "A_EGGMANBOX"},
{{A_TurretFire}, "A_TURRETFIRE"},
{{A_SuperTurretFire}, "A_SUPERTURRETFIRE"},
{{A_TurretStop}, "A_TURRETSTOP"},
{{A_JetJawRoam}, "A_JETJAWROAM"},
{{A_JetJawChomp}, "A_JETJAWCHOMP"},
{{A_PointyThink}, "A_POINTYTHINK"},
{{A_CheckBuddy}, "A_CHECKBUDDY"},
{{A_HoodThink}, "A_HOODTHINK"},
{{A_ArrowCheck}, "A_ARROWCHECK"},
{{A_SnailerThink}, "A_SNAILERTHINK"},
{{A_SharpChase}, "A_SHARPCHASE"},
{{A_SharpSpin}, "A_SHARPSPIN"},
{{A_VultureVtol}, "A_VULTUREVTOL"},
{{A_VultureCheck}, "A_VULTURECHECK"},
{{A_SkimChase}, "A_SKIMCHASE"},
{{A_1upThinker}, "A_1UPTHINKER"},
{{A_SkullAttack}, "A_SKULLATTACK"},
{{A_LobShot}, "A_LOBSHOT"},
{{A_FireShot}, "A_FIRESHOT"},
{{A_SuperFireShot}, "A_SUPERFIRESHOT"},
{{A_BossFireShot}, "A_BOSSFIRESHOT"},
{{A_Boss7FireMissiles}, "A_BOSS7FIREMISSILES"},
{{A_Boss1Laser}, "A_BOSS1LASER"},
{{A_Boss4Reverse}, "A_BOSS4REVERSE"},
{{A_Boss4SpeedUp}, "A_BOSS4SPEEDUP"},
{{A_Boss4Raise}, "A_BOSS4RAISE"},
{{A_SparkFollow}, "A_SPARKFOLLOW"},
{{A_BuzzFly}, "A_BUZZFLY"},
{{A_GuardChase}, "A_GUARDCHASE"},
{{A_EggShield}, "A_EGGSHIELD"},
{{A_SetReactionTime}, "A_SETREACTIONTIME"},
{{A_Boss1Spikeballs}, "A_BOSS1SPIKEBALLS"},
{{A_Boss3TakeDamage}, "A_BOSS3TAKEDAMAGE"},
{{A_Boss3Path}, "A_BOSS3PATH"},
{{A_LinedefExecute}, "A_LINEDEFEXECUTE"},
{{A_PlaySeeSound}, "A_PLAYSEESOUND"},
{{A_PlayAttackSound}, "A_PLAYATTACKSOUND"},
{{A_PlayActiveSound}, "A_PLAYACTIVESOUND"},
{{A_SpawnObjectAbsolute}, "A_SPAWNOBJECTABSOLUTE"},
{{A_SpawnObjectRelative}, "A_SPAWNOBJECTRELATIVE"},
{{A_ChangeAngleRelative}, "A_CHANGEANGLERELATIVE"},
{{A_ChangeAngleAbsolute}, "A_CHANGEANGLEABSOLUTE"},
{{A_PlaySound}, "A_PLAYSOUND"},
{{A_FindTarget}, "A_FINDTARGET"},
{{A_FindTracer}, "A_FINDTRACER"},
{{A_SetTics}, "A_SETTICS"},
{{A_SetRandomTics}, "A_SETRANDOMTICS"},
{{A_ChangeColorRelative}, "A_CHANGECOLORRELATIVE"},
{{A_ChangeColorAbsolute}, "A_CHANGECOLORABSOLUTE"},
{{A_MoveRelative}, "A_MOVERELATIVE"},
{{A_MoveAbsolute}, "A_MOVEABSOLUTE"},
{{A_Thrust}, "A_THRUST"},
{{A_ZThrust}, "A_ZTHRUST"},
{{A_SetTargetsTarget}, "A_SETTARGETSTARGET"},
{{A_SetObjectFlags}, "A_SETOBJECTFLAGS"},
{{A_SetObjectFlags2}, "A_SETOBJECTFLAGS2"},
{{A_RandomState}, "A_RANDOMSTATE"},
{{A_RandomStateRange}, "A_RANDOMSTATERANGE"},
{{A_DualAction}, "A_DUALACTION"},
{{A_RemoteAction}, "A_REMOTEACTION"},
{{A_ToggleFlameJet}, "A_TOGGLEFLAMEJET"},
{{A_ItemPop}, "A_ITEMPOP"}, // SRB2kart
{{A_JawzChase}, "A_JAWZCHASE"}, // SRB2kart
{{A_JawzExplode}, "A_JAWZEXPLODE"}, // SRB2kart
{{A_SPBChase}, "A_SPBCHASE"}, // SRB2kart
{{A_MineExplode}, "A_MINEEXPLODE"}, // SRB2kart
{{A_BallhogExplode}, "A_BALLHOGEXPLODE"}, // SRB2kart
{{A_LightningFollowPlayer},"A_LIGHTNINGFOLLOWPLAYER"}, //SRB2kart
{{A_FZBoomFlash}, "A_FZBOOMFLASH"}, //SRB2kart
{{A_FZBoomSmoke}, "A_FZBOOMSMOKE"}, //SRB2kart
{{A_RandomShadowFrame}, "A_RANDOMSHADOWFRAME"}, //SRB2kart
{{A_RoamingShadowThinker}, "A_ROAMINGSHADOWTHINKER"}, //SRB2kart
{{A_MayonakaArrow}, "A_MAYONAKAARROW"}, //SRB2kart
{{A_ReaperThinker}, "A_REAPERTHINKER"}, //SRB2kart
{{A_MementosTPParticles}, "A_MEMENTOSTPPARTICLES"}, //SRB2kart
{{A_FlameParticle}, "A_FLAMEPARTICLE"}, // SRB2kart
{{A_OrbitNights}, "A_ORBITNIGHTS"},
{{A_GhostMe}, "A_GHOSTME"},
{{A_SetObjectState}, "A_SETOBJECTSTATE"},
{{A_SetObjectTypeState}, "A_SETOBJECTTYPESTATE"},
{{A_KnockBack}, "A_KNOCKBACK"},
{{A_PushAway}, "A_PUSHAWAY"},
{{A_RingDrain}, "A_RINGDRAIN"},
{{A_SplitShot}, "A_SPLITSHOT"},
{{A_MissileSplit}, "A_MISSILESPLIT"},
{{A_MultiShot}, "A_MULTISHOT"},
{{A_InstaLoop}, "A_INSTALOOP"},
{{A_Custom3DRotate}, "A_CUSTOM3DROTATE"},
{{A_SearchForPlayers}, "A_SEARCHFORPLAYERS"},
{{A_CheckRandom}, "A_CHECKRANDOM"},
{{A_CheckTargetRings}, "A_CHECKTARGETRINGS"},
{{A_CheckRings}, "A_CHECKRINGS"},
{{A_CheckTotalRings}, "A_CHECKTOTALRINGS"},
{{A_CheckHealth}, "A_CHECKHEALTH"},
{{A_CheckRange}, "A_CHECKRANGE"},
{{A_CheckHeight}, "A_CHECKHEIGHT"},
{{A_CheckTrueRange}, "A_CHECKTRUERANGE"},
{{A_CheckThingCount}, "A_CHECKTHINGCOUNT"},
{{A_CheckAmbush}, "A_CHECKAMBUSH"},
{{A_CheckCustomValue}, "A_CHECKCUSTOMVALUE"},
{{A_CheckCusValMemo}, "A_CHECKCUSVALMEMO"},
{{A_SetCustomValue}, "A_SETCUSTOMVALUE"},
{{A_UseCusValMemo}, "A_USECUSVALMEMO"},
{{A_RelayCustomValue}, "A_RELAYCUSTOMVALUE"},
{{A_CusValAction}, "A_CUSVALACTION"},
{{A_ForceStop}, "A_FORCESTOP"},
{{A_ForceWin}, "A_FORCEWIN"},
{{A_SpikeRetract}, "A_SPIKERETRACT"},
{{A_InfoState}, "A_INFOSTATE"},
{{A_Repeat}, "A_REPEAT"},
{{A_SetScale}, "A_SETSCALE"},
{{A_RemoteDamage}, "A_REMOTEDAMAGE"},
{{A_HomingChase}, "A_HOMINGCHASE"},
{{A_TrapShot}, "A_TRAPSHOT"},
{{A_VileTarget}, "A_VILETARGET"},
{{A_VileAttack}, "A_VILEATTACK"},
{{A_VileFire}, "A_VILEFIRE"},
{{A_BrakChase}, "A_BRAKCHASE"},
{{A_BrakFireShot}, "A_BRAKFIRESHOT"},
{{A_BrakLobShot}, "A_BRAKLOBSHOT"},
{{A_NapalmScatter}, "A_NAPALMSCATTER"},
{{A_SpawnFreshCopy}, "A_SPAWNFRESHCOPY"},
{A_Explode, "A_EXPLODE"},
{A_Pain, "A_PAIN"},
{A_Fall, "A_FALL"},
{A_MonitorPop, "A_MONITORPOP"},
{A_Look, "A_LOOK"},
{A_Chase, "A_CHASE"},
{A_FaceStabChase, "A_FACESTABCHASE"},
{A_FaceTarget, "A_FACETARGET"},
{A_FaceTracer, "A_FACETRACER"},
{A_Scream, "A_SCREAM"},
{A_BossDeath, "A_BOSSDEATH"},
{A_CustomPower, "A_CUSTOMPOWER"},
{A_GiveWeapon, "A_GIVEWEAPON"},
{A_RingShield, "A_RINGSHIELD"},
{A_RingBox, "A_RINGBOX"},
{A_Invincibility, "A_INVINCIBILITY"},
{A_SuperSneakers, "A_SUPERSNEAKERS"},
{A_BunnyHop, "A_BUNNYHOP"},
{A_BubbleSpawn, "A_BUBBLESPAWN"},
{A_FanBubbleSpawn, "A_FANBUBBLESPAWN"},
{A_BubbleRise, "A_BUBBLERISE"},
{A_BubbleCheck, "A_BUBBLECHECK"},
{A_AwardScore, "A_AWARDSCORE"},
{A_ExtraLife, "A_EXTRALIFE"},
{A_BombShield, "A_BOMBSHIELD"},
{A_JumpShield, "A_JUMPSHIELD"},
{A_WaterShield, "A_WATERSHIELD"},
{A_ForceShield, "A_FORCESHIELD"},
{A_PityShield, "A_PITYSHIELD"},
{A_GravityBox, "A_GRAVITYBOX"},
{A_ScoreRise, "A_SCORERISE"},
{A_ParticleSpawn, "A_PARTICLESPAWN"},
{A_AttractChase, "A_ATTRACTCHASE"},
{A_DropMine, "A_DROPMINE"},
{A_FishJump, "A_FISHJUMP"},
{A_ThrownRing, "A_THROWNRING"},
{A_GrenadeRing, "A_GRENADERING"}, // SRB2kart
{A_SetSolidSteam, "A_SETSOLIDSTEAM"},
{A_UnsetSolidSteam, "A_UNSETSOLIDSTEAM"},
{A_SignPlayer, "A_SIGNPLAYER"},
{A_OverlayThink, "A_OVERLAYTHINK"},
{A_JetChase, "A_JETCHASE"},
{A_JetbThink, "A_JETBTHINK"},
{A_JetgThink, "A_JETGTHINK"},
{A_JetgShoot, "A_JETGSHOOT"},
{A_ShootBullet, "A_SHOOTBULLET"},
{A_MinusDigging, "A_MINUSDIGGING"},
{A_MinusPopup, "A_MINUSPOPUP"},
{A_MinusCheck, "A_MINUSCHECK"},
{A_ChickenCheck, "A_CHICKENCHECK"},
{A_MouseThink, "A_MOUSETHINK"},
{A_DetonChase, "A_DETONCHASE"},
{A_CapeChase, "A_CAPECHASE"},
{A_RotateSpikeBall, "A_ROTATESPIKEBALL"},
{A_SlingAppear, "A_SLINGAPPEAR"},
{A_MaceRotate, "A_MACEROTATE"},
{A_UnidusBall, "A_UNIDUSBALL"},
{A_RockSpawn, "A_ROCKSPAWN"},
{A_SetFuse, "A_SETFUSE"},
{A_CrawlaCommanderThink, "A_CRAWLACOMMANDERTHINK"},
{A_SmokeTrailer, "A_SMOKETRAILER"},
{A_RingExplode, "A_RINGEXPLODE"},
{A_OldRingExplode, "A_OLDRINGEXPLODE"},
{A_MixUp, "A_MIXUP"},
{A_RecyclePowers, "A_RECYCLEPOWERS"},
{A_Boss1Chase, "A_BOSS1CHASE"},
{A_FocusTarget, "A_FOCUSTARGET"},
{A_Boss2Chase, "A_BOSS2CHASE"},
{A_Boss2Pogo, "A_BOSS2POGO"},
{A_BossZoom, "A_BOSSZOOM"},
{A_BossScream, "A_BOSSSCREAM"},
{A_Boss2TakeDamage, "A_BOSS2TAKEDAMAGE"},
{A_Boss7Chase, "A_BOSS7CHASE"},
{A_GoopSplat, "A_GOOPSPLAT"},
{A_Boss2PogoSFX, "A_BOSS2POGOSFX"},
{A_Boss2PogoTarget, "A_BOSS2POGOTARGET"},
{A_BossJetFume, "A_BOSSJETFUME"},
{A_EggmanBox, "A_EGGMANBOX"},
{A_TurretFire, "A_TURRETFIRE"},
{A_SuperTurretFire, "A_SUPERTURRETFIRE"},
{A_TurretStop, "A_TURRETSTOP"},
{A_JetJawRoam, "A_JETJAWROAM"},
{A_JetJawChomp, "A_JETJAWCHOMP"},
{A_PointyThink, "A_POINTYTHINK"},
{A_CheckBuddy, "A_CHECKBUDDY"},
{A_HoodThink, "A_HOODTHINK"},
{A_ArrowCheck, "A_ARROWCHECK"},
{A_SnailerThink, "A_SNAILERTHINK"},
{A_SharpChase, "A_SHARPCHASE"},
{A_SharpSpin, "A_SHARPSPIN"},
{A_VultureVtol, "A_VULTUREVTOL"},
{A_VultureCheck, "A_VULTURECHECK"},
{A_SkimChase, "A_SKIMCHASE"},
{A_1upThinker, "A_1UPTHINKER"},
{A_SkullAttack, "A_SKULLATTACK"},
{A_LobShot, "A_LOBSHOT"},
{A_FireShot, "A_FIRESHOT"},
{A_SuperFireShot, "A_SUPERFIRESHOT"},
{A_BossFireShot, "A_BOSSFIRESHOT"},
{A_Boss7FireMissiles, "A_BOSS7FIREMISSILES"},
{A_Boss1Laser, "A_BOSS1LASER"},
{A_Boss4Reverse, "A_BOSS4REVERSE"},
{A_Boss4SpeedUp, "A_BOSS4SPEEDUP"},
{A_Boss4Raise, "A_BOSS4RAISE"},
{A_SparkFollow, "A_SPARKFOLLOW"},
{A_BuzzFly, "A_BUZZFLY"},
{A_GuardChase, "A_GUARDCHASE"},
{A_EggShield, "A_EGGSHIELD"},
{A_SetReactionTime, "A_SETREACTIONTIME"},
{A_Boss1Spikeballs, "A_BOSS1SPIKEBALLS"},
{A_Boss3TakeDamage, "A_BOSS3TAKEDAMAGE"},
{A_Boss3Path, "A_BOSS3PATH"},
{A_LinedefExecute, "A_LINEDEFEXECUTE"},
{A_PlaySeeSound, "A_PLAYSEESOUND"},
{A_PlayAttackSound, "A_PLAYATTACKSOUND"},
{A_PlayActiveSound, "A_PLAYACTIVESOUND"},
{A_SpawnObjectAbsolute, "A_SPAWNOBJECTABSOLUTE"},
{A_SpawnObjectRelative, "A_SPAWNOBJECTRELATIVE"},
{A_ChangeAngleRelative, "A_CHANGEANGLERELATIVE"},
{A_ChangeAngleAbsolute, "A_CHANGEANGLEABSOLUTE"},
{A_PlaySound, "A_PLAYSOUND"},
{A_FindTarget, "A_FINDTARGET"},
{A_FindTracer, "A_FINDTRACER"},
{A_SetTics, "A_SETTICS"},
{A_SetRandomTics, "A_SETRANDOMTICS"},
{A_ChangeColorRelative, "A_CHANGECOLORRELATIVE"},
{A_ChangeColorAbsolute, "A_CHANGECOLORABSOLUTE"},
{A_MoveRelative, "A_MOVERELATIVE"},
{A_MoveAbsolute, "A_MOVEABSOLUTE"},
{A_Thrust, "A_THRUST"},
{A_ZThrust, "A_ZTHRUST"},
{A_SetTargetsTarget, "A_SETTARGETSTARGET"},
{A_SetObjectFlags, "A_SETOBJECTFLAGS"},
{A_SetObjectFlags2, "A_SETOBJECTFLAGS2"},
{A_RandomState, "A_RANDOMSTATE"},
{A_RandomStateRange, "A_RANDOMSTATERANGE"},
{A_DualAction, "A_DUALACTION"},
{A_RemoteAction, "A_REMOTEACTION"},
{A_ToggleFlameJet, "A_TOGGLEFLAMEJET"},
{A_ItemPop, "A_ITEMPOP"}, // SRB2kart
{A_JawzChase, "A_JAWZCHASE"}, // SRB2kart
{A_JawzExplode, "A_JAWZEXPLODE"}, // SRB2kart
{A_SPBChase, "A_SPBCHASE"}, // SRB2kart
{A_MineExplode, "A_MINEEXPLODE"}, // SRB2kart
{A_BallhogExplode, "A_BALLHOGEXPLODE"}, // SRB2kart
{A_LightningFollowPlayer,"A_LIGHTNINGFOLLOWPLAYER"}, //SRB2kart
{A_FZBoomFlash, "A_FZBOOMFLASH"}, //SRB2kart
{A_FZBoomSmoke, "A_FZBOOMSMOKE"}, //SRB2kart
{A_RandomShadowFrame, "A_RANDOMSHADOWFRAME"}, //SRB2kart
{A_RoamingShadowThinker, "A_ROAMINGSHADOWTHINKER"}, //SRB2kart
{A_MayonakaArrow, "A_MAYONAKAARROW"}, //SRB2kart
{A_ReaperThinker, "A_REAPERTHINKER"}, //SRB2kart
{A_MementosTPParticles, "A_MEMENTOSTPPARTICLES"}, //SRB2kart
{A_FlameParticle, "A_FLAMEPARTICLE"}, // SRB2kart
{A_OrbitNights, "A_ORBITNIGHTS"},
{A_GhostMe, "A_GHOSTME"},
{A_SetObjectState, "A_SETOBJECTSTATE"},
{A_SetObjectTypeState, "A_SETOBJECTTYPESTATE"},
{A_KnockBack, "A_KNOCKBACK"},
{A_PushAway, "A_PUSHAWAY"},
{A_RingDrain, "A_RINGDRAIN"},
{A_SplitShot, "A_SPLITSHOT"},
{A_MissileSplit, "A_MISSILESPLIT"},
{A_MultiShot, "A_MULTISHOT"},
{A_InstaLoop, "A_INSTALOOP"},
{A_Custom3DRotate, "A_CUSTOM3DROTATE"},
{A_SearchForPlayers, "A_SEARCHFORPLAYERS"},
{A_CheckRandom, "A_CHECKRANDOM"},
{A_CheckTargetRings, "A_CHECKTARGETRINGS"},
{A_CheckRings, "A_CHECKRINGS"},
{A_CheckTotalRings, "A_CHECKTOTALRINGS"},
{A_CheckHealth, "A_CHECKHEALTH"},
{A_CheckRange, "A_CHECKRANGE"},
{A_CheckHeight, "A_CHECKHEIGHT"},
{A_CheckTrueRange, "A_CHECKTRUERANGE"},
{A_CheckThingCount, "A_CHECKTHINGCOUNT"},
{A_CheckAmbush, "A_CHECKAMBUSH"},
{A_CheckCustomValue, "A_CHECKCUSTOMVALUE"},
{A_CheckCusValMemo, "A_CHECKCUSVALMEMO"},
{A_SetCustomValue, "A_SETCUSTOMVALUE"},
{A_UseCusValMemo, "A_USECUSVALMEMO"},
{A_RelayCustomValue, "A_RELAYCUSTOMVALUE"},
{A_CusValAction, "A_CUSVALACTION"},
{A_ForceStop, "A_FORCESTOP"},
{A_ForceWin, "A_FORCEWIN"},
{A_SpikeRetract, "A_SPIKERETRACT"},
{A_InfoState, "A_INFOSTATE"},
{A_Repeat, "A_REPEAT"},
{A_SetScale, "A_SETSCALE"},
{A_RemoteDamage, "A_REMOTEDAMAGE"},
{A_HomingChase, "A_HOMINGCHASE"},
{A_TrapShot, "A_TRAPSHOT"},
{A_VileTarget, "A_VILETARGET"},
{A_VileAttack, "A_VILEATTACK"},
{A_VileFire, "A_VILEFIRE"},
{A_BrakChase, "A_BRAKCHASE"},
{A_BrakFireShot, "A_BRAKFIRESHOT"},
{A_BrakLobShot, "A_BRAKLOBSHOT"},
{A_NapalmScatter, "A_NAPALMSCATTER"},
{A_SpawnFreshCopy, "A_SPAWNFRESHCOPY"},
//{A_InvincSparkleRotate, "A_INVINCSPARKLEROTATE"},
{{NULL}, "NONE"},
{NULL, "NONE"},
// This NULL entry must be the last in the list
{{NULL}, NULL},
{NULL, NULL},
};
static void readframe(MYFILE *f, INT32 num)
@@ -1702,7 +1703,7 @@ static void readframe(MYFILE *f, INT32 num)
for (z = 0; actionpointers[z].name; z++)
{
if (actionpointers[z].action.acv == states[num].action.acv)
if (actionpointers[z].action == states[num].action)
{
break;
}
@@ -1711,17 +1712,17 @@ static void readframe(MYFILE *f, INT32 num)
z = 0;
found = LUA_SetLuaAction(&states[num], actiontocompare);
if (!found)
while (actionpointers[z].name)
{
if (fastcmp(actiontocompare, actionpointers[z].name))
while (actionpointers[z].name)
{
states[num].action = actionpointers[z].action;
states[num].action.acv = actionpointers[z].action.acv; // assign
states[num].action.acp1 = actionpointers[z].action.acp1;
found = true;
break;
if (fastcmp(actiontocompare, actionpointers[z].name))
{
states[num].action = actionpointers[z].action;
found = true;
break;
}
z++;
}
z++;
}
if (!found)
@@ -8524,13 +8525,13 @@ static inline int lib_freeslot(lua_State *L)
// Arguments: mobj_t actor, int var1, int var2
static inline int lib_action(lua_State *L)
{
actionf_t *action = lua_touserdata(L,lua_upvalueindex(1));
actionf_p1 *action = lua_touserdata(L,lua_upvalueindex(1));
mobj_t *actor = *((mobj_t **)luaL_checkudata(L,1,META_MOBJ));
var1 = (INT32)luaL_optinteger(L,2,0);
var2 = (INT32)luaL_optinteger(L,3,0);
if (!actor)
return LUA_ErrInvalid(L, "mobj_t");
action->acp1(actor);
(*action)(actor);
return 0;
}
@@ -9344,13 +9345,15 @@ int LUA_SOCLib(lua_State *L)
const char *LUA_GetActionName(void *action)
{
actionf_t *act = (actionf_t *)action;
actionf_p1 *act = (actionf_p1 *)action;
size_t z;
for (z = 0; actionpointers[z].name; z++)
{
if (actionpointers[z].action.acv == act->acv)
if (actionpointers[z].action == *act)
return actionpointers[z].name;
}
return NULL;
}
@@ -9363,8 +9366,6 @@ void LUA_SetActionByName(void *state, const char *actiontocompare)
if (fasticmp(actiontocompare, actionpointers[z].name))
{
st->action = actionpointers[z].action;
st->action.acv = actionpointers[z].action.acv; // assign
st->action.acp1 = actionpointers[z].action.acp1;
return;
}
}
+3939 -1
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -792,7 +792,7 @@ static void HWR_PrecacheLevelSprites(void)
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
mo = (mobj_t *)th;
+2660 -2717
View File
File diff suppressed because it is too large. Load diff
+202 -205
View File
@@ -26,7 +26,7 @@
*/
typedef struct
{
actionf_t action; ///< Function pointer corresponding to the actual action.
actionf_p1 action; ///< Function pointer corresponding to the actual action.
const char *name; ///< Name of the action in ALL CAPS.
} actionpointer_t;
@@ -246,209 +246,206 @@ struct mobj_s;
// IMPORTANT NOTE: If you add/remove from this list of action
// functions, don't forget to update them in dehacked.c!
void A_Explode(struct mobj_s *actor);
void A_Pain(struct mobj_s *actor);
void A_Fall(struct mobj_s *actor);
void A_MonitorPop(struct mobj_s *actor);
void A_Look(struct mobj_s *actor);
void A_Chase(struct mobj_s *actor);
void A_FaceStabChase(struct mobj_s *actor);
void A_FaceTarget(struct mobj_s *actor);
void A_FaceTracer(struct mobj_s *actor);
void A_Scream(struct mobj_s *actor);
void A_BossDeath(struct mobj_s *actor);
void A_CustomPower(struct mobj_s *actor); // Use this for a custom power
void A_GiveWeapon(struct mobj_s *actor); // Gives the player weapon(s)
void A_JumpShield(struct mobj_s *actor); // Obtained Jump Shield
void A_RingShield(struct mobj_s *actor); // Obtained Ring Shield
void A_RingBox(struct mobj_s *actor); // Obtained Ring Box Tails
void A_Invincibility(struct mobj_s *actor); // Obtained Invincibility Box
void A_SuperSneakers(struct mobj_s *actor); // Obtained Super Sneakers Box
void A_BunnyHop(struct mobj_s *actor); // have bunny hop tails
void A_BubbleSpawn(struct mobj_s *actor); // Randomly spawn bubbles
void A_FanBubbleSpawn(struct mobj_s *actor);
void A_BubbleRise(struct mobj_s *actor); // Bubbles float to surface
void A_BubbleCheck(struct mobj_s *actor); // Don't draw if not underwater
void A_AwardScore(struct mobj_s *actor);
void A_ExtraLife(struct mobj_s *actor); // Extra Life
void A_BombShield(struct mobj_s *actor); // Obtained Bomb Shield
void A_WaterShield(struct mobj_s *actor); // Obtained Water Shield
void A_ForceShield(struct mobj_s *actor); // Obtained Force Shield
void A_PityShield(struct mobj_s *actor); // Obtained Pity Shield. We're... sorry.
void A_GravityBox(struct mobj_s *actor);
void A_ScoreRise(struct mobj_s *actor); // Rise the score logo
void A_ParticleSpawn(struct mobj_s *actor);
void A_AttractChase(struct mobj_s *actor); // Ring Chase
void A_DropMine(struct mobj_s *actor); // Drop Mine from Skim or Jetty-Syn Bomber
void A_FishJump(struct mobj_s *actor); // Fish Jump
void A_ThrownRing(struct mobj_s *actor); // Sparkle trail for red ring
void A_GrenadeRing(struct mobj_s *actor); // SRB2kart
void A_SetSolidSteam(struct mobj_s *actor);
void A_UnsetSolidSteam(struct mobj_s *actor);
void A_SignPlayer(struct mobj_s *actor);
void A_OverlayThink(struct mobj_s *actor);
void A_JetChase(struct mobj_s *actor);
void A_JetbThink(struct mobj_s *actor); // Jetty-Syn Bomber Thinker
void A_JetgThink(struct mobj_s *actor); // Jetty-Syn Gunner Thinker
void A_JetgShoot(struct mobj_s *actor); // Jetty-Syn Shoot Function
void A_ShootBullet(struct mobj_s *actor); // JetgShoot without reactiontime setting
void A_MinusDigging(struct mobj_s *actor);
void A_MinusPopup(struct mobj_s *actor);
void A_MinusCheck(struct mobj_s *actor);
void A_ChickenCheck(struct mobj_s *actor);
void A_MouseThink(struct mobj_s *actor); // Mouse Thinker
void A_DetonChase(struct mobj_s *actor); // Deton Chaser
void A_CapeChase(struct mobj_s *actor); // Fake little Super Sonic cape
void A_RotateSpikeBall(struct mobj_s *actor); // Spike ball rotation
void A_SlingAppear(struct mobj_s *actor);
void A_MaceRotate(struct mobj_s *actor);
void A_UnidusBall(struct mobj_s *actor);
void A_RockSpawn(struct mobj_s *actor);
void A_SetFuse(struct mobj_s *actor);
void A_CrawlaCommanderThink(struct mobj_s *actor); // Crawla Commander
void A_SmokeTrailer(struct mobj_s *actor);
void A_RingExplode(struct mobj_s *actor);
void A_OldRingExplode(struct mobj_s *actor);
void A_MixUp(struct mobj_s *actor);
void A_RecyclePowers(struct mobj_s *actor);
void A_BossScream(struct mobj_s *actor);
void A_Boss2TakeDamage(struct mobj_s *actor);
void A_GoopSplat(struct mobj_s *actor);
void A_Boss2PogoSFX(struct mobj_s *actor);
void A_Boss2PogoTarget(struct mobj_s *actor);
void A_EggmanBox(struct mobj_s *actor);
void A_TurretFire(struct mobj_s *actor);
void A_SuperTurretFire(struct mobj_s *actor);
void A_TurretStop(struct mobj_s *actor);
void A_JetJawRoam(struct mobj_s *actor);
void A_JetJawChomp(struct mobj_s *actor);
void A_PointyThink(struct mobj_s *actor);
void A_CheckBuddy(struct mobj_s *actor);
void A_HoodThink(struct mobj_s *actor);
void A_ArrowCheck(struct mobj_s *actor);
void A_SnailerThink(struct mobj_s *actor);
void A_SharpChase(struct mobj_s *actor);
void A_SharpSpin(struct mobj_s *actor);
void A_VultureVtol(struct mobj_s *actor);
void A_VultureCheck(struct mobj_s *actor);
void A_SkimChase(struct mobj_s *actor);
void A_SkullAttack(struct mobj_s *actor);
void A_LobShot(struct mobj_s *actor);
void A_FireShot(struct mobj_s *actor);
void A_SuperFireShot(struct mobj_s *actor);
void A_BossFireShot(struct mobj_s *actor);
void A_Boss7FireMissiles(struct mobj_s *actor);
void A_Boss1Laser(struct mobj_s *actor);
void A_FocusTarget(struct mobj_s *actor);
void A_Boss4Reverse(struct mobj_s *actor);
void A_Boss4SpeedUp(struct mobj_s *actor);
void A_Boss4Raise(struct mobj_s *actor);
void A_SparkFollow(struct mobj_s *actor);
void A_BuzzFly(struct mobj_s *actor);
void A_GuardChase(struct mobj_s *actor);
void A_EggShield(struct mobj_s *actor);
void A_SetReactionTime(struct mobj_s *actor);
void A_Boss1Spikeballs(struct mobj_s *actor);
void A_Boss3TakeDamage(struct mobj_s *actor);
void A_Boss3Path(struct mobj_s *actor);
void A_LinedefExecute(struct mobj_s *actor);
void A_PlaySeeSound(struct mobj_s *actor);
void A_PlayAttackSound(struct mobj_s *actor);
void A_PlayActiveSound(struct mobj_s *actor);
void A_1upThinker(struct mobj_s *actor);
void A_BossZoom(struct mobj_s *actor); //Unused
void A_Boss1Chase(struct mobj_s *actor);
void A_Boss2Chase(struct mobj_s *actor);
void A_Boss2Pogo(struct mobj_s *actor);
void A_Boss7Chase(struct mobj_s *actor);
void A_BossJetFume(struct mobj_s *actor);
void A_SpawnObjectAbsolute(struct mobj_s *actor);
void A_SpawnObjectRelative(struct mobj_s *actor);
void A_ChangeAngleRelative(struct mobj_s *actor);
void A_ChangeAngleAbsolute(struct mobj_s *actor);
void A_RollAngle(struct mobj_s *actor);
void A_ChangeRollAngleRelative(struct mobj_s *actor);
void A_ChangeRollAngleAbsolute(struct mobj_s *actor);
void A_PlaySound(struct mobj_s *actor);
void A_FindTarget(struct mobj_s *actor);
void A_FindTracer(struct mobj_s *actor);
void A_SetTics(struct mobj_s *actor);
void A_SetRandomTics(struct mobj_s *actor);
void A_ChangeColorRelative(struct mobj_s *actor);
void A_ChangeColorAbsolute(struct mobj_s *actor);
void A_MoveRelative(struct mobj_s *actor);
void A_MoveAbsolute(struct mobj_s *actor);
void A_Thrust(struct mobj_s *actor);
void A_ZThrust(struct mobj_s *actor);
void A_SetTargetsTarget(struct mobj_s *actor);
void A_SetObjectFlags(struct mobj_s *actor);
void A_SetObjectFlags2(struct mobj_s *actor);
void A_RandomState(struct mobj_s *actor);
void A_RandomStateRange(struct mobj_s *actor);
void A_DualAction(struct mobj_s *actor);
void A_RemoteAction(struct mobj_s *actor);
void A_ToggleFlameJet(struct mobj_s *actor);
void A_ItemPop(struct mobj_s *actor); // SRB2kart
void A_JawzChase(struct mobj_s *actor); // SRB2kart
void A_JawzExplode(struct mobj_s *actor); // SRB2kart
void A_SPBChase(struct mobj_s *actor); // SRB2kart
void A_MineExplode(struct mobj_s *actor); // SRB2kart
void A_BallhogExplode(struct mobj_s *actor); // SRB2kart
void A_LightningFollowPlayer(struct mobj_s *actor); // SRB2kart: Lightning shield effect player chasing
void A_FZBoomFlash(struct mobj_s *actor); // SRB2kart
void A_FZBoomSmoke(struct mobj_s *actor); // SRB2kart
void A_RandomShadowFrame(struct mobj_s *actor); //SRB2kart: Shadow spawner frame randomizer
void A_RoamingShadowThinker(struct mobj_s *actor); // SRB2kart: Roaming Shadow moving + attacking players.
void A_MayonakaArrow(struct mobj_s *actor); //SRB2kart: midnight channel arrow sign
void A_ReaperThinker(struct mobj_s *actor); //SRB2kart: mementos reaper
void A_MementosTPParticles(struct mobj_s *actor); //SRB2kart: mementos teleporter particles. Man that's a lot of actions for my shite.
void A_FlameParticle(struct mobj_s *actor); // SRB2kart
void A_OrbitNights(struct mobj_s *actor);
void A_GhostMe(struct mobj_s *actor);
void A_SetObjectState(struct mobj_s *actor);
void A_SetObjectTypeState(struct mobj_s *actor);
void A_KnockBack(struct mobj_s *actor);
void A_PushAway(struct mobj_s *actor);
void A_RingDrain(struct mobj_s *actor);
void A_SplitShot(struct mobj_s *actor);
void A_MissileSplit(struct mobj_s *actor);
void A_MultiShot(struct mobj_s *actor);
void A_InstaLoop(struct mobj_s *actor);
void A_Custom3DRotate(struct mobj_s *actor);
void A_SearchForPlayers(struct mobj_s *actor);
void A_CheckRandom(struct mobj_s *actor);
void A_CheckTargetRings(struct mobj_s *actor);
void A_CheckRings(struct mobj_s *actor);
void A_CheckTotalRings(struct mobj_s *actor);
void A_CheckHealth(struct mobj_s *actor);
void A_CheckRange(struct mobj_s *actor);
void A_CheckHeight(struct mobj_s *actor);
void A_CheckTrueRange(struct mobj_s *actor);
void A_CheckThingCount(struct mobj_s *actor);
void A_CheckAmbush(struct mobj_s *actor);
void A_CheckCustomValue(struct mobj_s *actor);
void A_CheckCusValMemo(struct mobj_s *actor);
void A_SetCustomValue(struct mobj_s *actor);
void A_UseCusValMemo(struct mobj_s *actor);
void A_RelayCustomValue(struct mobj_s *actor);
void A_CusValAction(struct mobj_s *actor);
void A_ForceStop(struct mobj_s *actor);
void A_ForceWin(struct mobj_s *actor);
void A_SpikeRetract(struct mobj_s *actor);
void A_InfoState(struct mobj_s *actor);
void A_Repeat(struct mobj_s *actor);
void A_SetScale(struct mobj_s *actor);
void A_RemoteDamage(struct mobj_s *actor);
void A_HomingChase(struct mobj_s *actor);
void A_TrapShot(struct mobj_s *actor);
void A_VileTarget(struct mobj_s *actor);
void A_VileAttack(struct mobj_s *actor);
void A_VileFire(struct mobj_s *actor);
void A_BrakChase(struct mobj_s *actor);
void A_BrakFireShot(struct mobj_s *actor);
void A_BrakLobShot(struct mobj_s *actor);
void A_NapalmScatter(struct mobj_s *actor);
void A_SpawnFreshCopy(struct mobj_s *actor);
void A_Explode(void *actor);
void A_Pain(void *actor);
void A_Fall(void *actor);
void A_MonitorPop(void *actor);
void A_Look(void *actor);
void A_Chase(void *actor);
void A_FaceStabChase(void *actor);
void A_FaceTarget(void *actor);
void A_FaceTracer(void *actor);
void A_Scream(void *actor);
void A_BossDeath(void *actor);
void A_CustomPower(void *actor); // Use this for a custom power
void A_GiveWeapon(void *actor); // Gives the player weapon(s)
void A_JumpShield(void *actor); // Obtained Jump Shield
void A_RingShield(void *actor); // Obtained Ring Shield
void A_RingBox(void *actor); // Obtained Ring Box Tails
void A_Invincibility(void *actor); // Obtained Invincibility Box
void A_SuperSneakers(void *actor); // Obtained Super Sneakers Box
void A_BunnyHop(void *actor); // have bunny hop tails
void A_BubbleSpawn(void *actor); // Randomly spawn bubbles
void A_FanBubbleSpawn(void *actor);
void A_BubbleRise(void *actor); // Bubbles float to surface
void A_BubbleCheck(void *actor); // Don't draw if not underwater
void A_AwardScore(void *actor);
void A_ExtraLife(void *actor); // Extra Life
void A_BombShield(void *actor); // Obtained Bomb Shield
void A_WaterShield(void *actor); // Obtained Water Shield
void A_ForceShield(void *actor); // Obtained Force Shield
void A_PityShield(void *actor); // Obtained Pity Shield. We're... sorry.
void A_GravityBox(void *actor);
void A_ScoreRise(void *actor); // Rise the score logo
void A_ParticleSpawn(void *actor);
void A_AttractChase(void *actor); // Ring Chase
void A_DropMine(void *actor); // Drop Mine from Skim or Jetty-Syn Bomber
void A_FishJump(void *actor); // Fish Jump
void A_ThrownRing(void *actor); // Sparkle trail for red ring
void A_GrenadeRing(void *actor); // SRB2kart
void A_SetSolidSteam(void *actor);
void A_UnsetSolidSteam(void *actor);
void A_SignPlayer(void *actor);
void A_OverlayThink(void *actor);
void A_JetChase(void *actor);
void A_JetbThink(void *actor); // Jetty-Syn Bomber Thinker
void A_JetgThink(void *actor); // Jetty-Syn Gunner Thinker
void A_JetgShoot(void *actor); // Jetty-Syn Shoot Function
void A_ShootBullet(void *actor); // JetgShoot without reactiontime setting
void A_MinusDigging(void *actor);
void A_MinusPopup(void *actor);
void A_MinusCheck(void *actor);
void A_ChickenCheck(void *actor);
void A_MouseThink(void *actor); // Mouse Thinker
void A_DetonChase(void *actor); // Deton Chaser
void A_CapeChase(void *actor); // Fake little Super Sonic cape
void A_RotateSpikeBall(void *actor); // Spike ball rotation
void A_SlingAppear(void *actor);
void A_MaceRotate(void *actor);
void A_UnidusBall(void *actor);
void A_RockSpawn(void *actor);
void A_SetFuse(void *actor);
void A_CrawlaCommanderThink(void *actor); // Crawla Commander
void A_SmokeTrailer(void *actor);
void A_RingExplode(void *actor);
void A_OldRingExplode(void *actor);
void A_MixUp(void *actor);
void A_RecyclePowers(void *actor);
void A_BossScream(void *actor);
void A_Boss2TakeDamage(void *actor);
void A_GoopSplat(void *actor);
void A_Boss2PogoSFX(void *actor);
void A_Boss2PogoTarget(void *actor);
void A_EggmanBox(void *actor);
void A_TurretFire(void *actor);
void A_SuperTurretFire(void *actor);
void A_TurretStop(void *actor);
void A_JetJawRoam(void *actor);
void A_JetJawChomp(void *actor);
void A_PointyThink(void *actor);
void A_CheckBuddy(void *actor);
void A_HoodThink(void *actor);
void A_ArrowCheck(void *actor);
void A_SnailerThink(void *actor);
void A_SharpChase(void *actor);
void A_SharpSpin(void *actor);
void A_VultureVtol(void *actor);
void A_VultureCheck(void *actor);
void A_SkimChase(void *actor);
void A_SkullAttack(void *actor);
void A_LobShot(void *actor);
void A_FireShot(void *actor);
void A_SuperFireShot(void *actor);
void A_BossFireShot(void *actor);
void A_Boss7FireMissiles(void *actor);
void A_Boss1Laser(void *actor);
void A_FocusTarget(void *actor);
void A_Boss4Reverse(void *actor);
void A_Boss4SpeedUp(void *actor);
void A_Boss4Raise(void *actor);
void A_SparkFollow(void *actor);
void A_BuzzFly(void *actor);
void A_GuardChase(void *actor);
void A_EggShield(void *actor);
void A_SetReactionTime(void *actor);
void A_Boss1Spikeballs(void *actor);
void A_Boss3TakeDamage(void *actor);
void A_Boss3Path(void *actor);
void A_LinedefExecute(void *actor);
void A_PlaySeeSound(void *actor);
void A_PlayAttackSound(void *actor);
void A_PlayActiveSound(void *actor);
void A_1upThinker(void *actor);
void A_BossZoom(void *actor); //Unused
void A_Boss1Chase(void *actor);
void A_Boss2Chase(void *actor);
void A_Boss2Pogo(void *actor);
void A_Boss7Chase(void *actor);
void A_BossJetFume(void *actor);
void A_SpawnObjectAbsolute(void *actor);
void A_SpawnObjectRelative(void *actor);
void A_ChangeAngleRelative(void *actor);
void A_ChangeAngleAbsolute(void *actor);
void A_PlaySound(void *actor);
void A_FindTarget(void *actor);
void A_FindTracer(void *actor);
void A_SetTics(void *actor);
void A_SetRandomTics(void *actor);
void A_ChangeColorRelative(void *actor);
void A_ChangeColorAbsolute(void *actor);
void A_MoveRelative(void *actor);
void A_MoveAbsolute(void *actor);
void A_Thrust(void *actor);
void A_ZThrust(void *actor);
void A_SetTargetsTarget(void *actor);
void A_SetObjectFlags(void *actor);
void A_SetObjectFlags2(void *actor);
void A_RandomState(void *actor);
void A_RandomStateRange(void *actor);
void A_DualAction(void *actor);
void A_RemoteAction(void *actor);
void A_ToggleFlameJet(void *actor);
void A_ItemPop(void *actor); // SRB2kart
void A_JawzChase(void *actor); // SRB2kart
void A_JawzExplode(void *actor); // SRB2kart
void A_SPBChase(void *actor); // SRB2kart
void A_MineExplode(void *actor); // SRB2kart
void A_BallhogExplode(void *actor); // SRB2kart
void A_LightningFollowPlayer(void *actor); // SRB2kart: Lightning shield effect player chasing
void A_FZBoomFlash(void *actor); // SRB2kart
void A_FZBoomSmoke(void *actor); // SRB2kart
void A_RandomShadowFrame(void *actor); //SRB2kart: Shadow spawner frame randomizer
void A_RoamingShadowThinker(void *actor); // SRB2kart: Roaming Shadow moving + attacking players.
void A_MayonakaArrow(void *actor); //SRB2kart: midnight channel arrow sign
void A_ReaperThinker(void *actor); //SRB2kart: mementos reaper
void A_MementosTPParticles(void *actor); //SRB2kart: mementos teleporter particles. Man that's a lot of actions for my shite.
void A_FlameParticle(void *actor); // SRB2kart
void A_OrbitNights(void *actor);
void A_GhostMe(void *actor);
void A_SetObjectState(void *actor);
void A_SetObjectTypeState(void *actor);
void A_KnockBack(void *actor);
void A_PushAway(void *actor);
void A_RingDrain(void *actor);
void A_SplitShot(void *actor);
void A_MissileSplit(void *actor);
void A_MultiShot(void *actor);
void A_InstaLoop(void *actor);
void A_Custom3DRotate(void *actor);
void A_SearchForPlayers(void *actor);
void A_CheckRandom(void *actor);
void A_CheckTargetRings(void *actor);
void A_CheckRings(void *actor);
void A_CheckTotalRings(void *actor);
void A_CheckHealth(void *actor);
void A_CheckRange(void *actor);
void A_CheckHeight(void *actor);
void A_CheckTrueRange(void *actor);
void A_CheckThingCount(void *actor);
void A_CheckAmbush(void *actor);
void A_CheckCustomValue(void *actor);
void A_CheckCusValMemo(void *actor);
void A_SetCustomValue(void *actor);
void A_UseCusValMemo(void *actor);
void A_RelayCustomValue(void *actor);
void A_CusValAction(void *actor);
void A_ForceStop(void *actor);
void A_ForceWin(void *actor);
void A_SpikeRetract(void *actor);
void A_InfoState(void *actor);
void A_Repeat(void *actor);
void A_SetScale(void *actor);
void A_RemoteDamage(void *actor);
void A_HomingChase(void *actor);
void A_TrapShot(void *actor);
void A_VileTarget(void *actor);
void A_VileAttack(void *actor);
void A_VileFire(void *actor);
void A_BrakChase(void *actor);
void A_BrakFireShot(void *actor);
void A_BrakLobShot(void *actor);
void A_NapalmScatter(void *actor);
void A_SpawnFreshCopy(void *actor);
extern boolean actionsoverridden[NUMACTIONS];
@@ -4312,7 +4309,7 @@ typedef struct
spritenum_t sprite;
UINT32 frame; // we use the upper 16 bits for translucency and other shade effects
INT32 tics;
actionf_t action;
actionf_p1 action;
INT32 var1;
INT32 var2;
statenum_t nextstate;
+22 -20
View File
@@ -522,6 +522,7 @@ void K_RainbowColormap(UINT8 *dest_colormap, UINT8 skincolor)
dest_colormap[i] = (UINT8)i;
continue;
}
color = V_GetColor(i);
SETBRIGHTNESS(brightness, color.s.red, color.s.green, color.s.blue);
brightdif = 256;
@@ -2440,7 +2441,7 @@ void K_SpinPlayer(player_t *player, mobj_t *source, INT32 type, mobj_t *inflicto
static void K_RemoveGrowShrink(player_t *player)
{
if (player->mo && !P_MobjWasRemoved(player->mo))
if (!P_MobjWasRemoved(player->mo))
{
if (player->kartstuff[k_growshrinktimer] > 0) // Play Shrink noise
S_StartSound(player->mo, sfx_kc59);
@@ -2853,7 +2854,7 @@ void K_SpawnKartExplosion(fixed_t x, fixed_t y, fixed_t z, fixed_t radius, INT32
mobj->momy = FixedMul(FixedDiv(mobjy - y, dist), FixedDiv(dist, 6*FRACUNIT));
mobj->momz = FixedMul(FixedDiv(mobjz - z, dist), FixedDiv(dist, 6*FRACUNIT));
if (source && !P_MobjWasRemoved(source))
if (!P_MobjWasRemoved(source))
P_SetTarget(&mobj->target, source);
}
}
@@ -3666,7 +3667,7 @@ static mobj_t *K_FindLastTrailMobj(player_t *player)
if (!player || !(trail = player->mo) || !player->mo->hnext || !player->mo->hnext->health)
return NULL;
while (trail->hnext && !P_MobjWasRemoved(trail->hnext) && trail->hnext->health)
while (!P_MobjWasRemoved(trail->hnext) && trail->hnext->health)
{
trail = trail->hnext;
}
@@ -3903,7 +3904,7 @@ void K_PuntMine(mobj_t *thismine, mobj_t *punter)
fixed_t spd;
mobj_t *mine;
if (!thismine || P_MobjWasRemoved(thismine))
if (P_MobjWasRemoved(thismine))
return;
//This guarantees you hit a mine being dragged
@@ -3932,7 +3933,7 @@ void K_PuntMine(mobj_t *thismine, mobj_t *punter)
else
mine = thismine;
if (!mine || P_MobjWasRemoved(mine))
if (P_MobjWasRemoved(mine))
return;
spd = K_GetProjectileSpeed();
@@ -4099,7 +4100,8 @@ void K_DoSneaker(player_t *player, INT32 type)
if (player->mo->hnext)
{
mobj_t *cur = player->mo->hnext;
while (cur && !P_MobjWasRemoved(cur))
while (!P_MobjWasRemoved(cur))
{
if (!cur->tracer)
{
@@ -4163,7 +4165,7 @@ static void K_DoShrink(player_t *user)
K_DropItems(&players[i]);
players[i].kartstuff[k_growshrinktimer] = -(20*TICRATE);
if (players[i].mo && !P_MobjWasRemoved(players[i].mo))
if (!P_MobjWasRemoved(players[i].mo))
{
players[i].mo->scalespeed = mapobjectscale/TICRATE;
players[i].mo->destscale = (6*mapobjectscale)/8;
@@ -4293,7 +4295,7 @@ void K_DropHnextList(player_t *player)
mobjtype_t type;
boolean orbit, ponground, dropall = true;
if (!work || P_MobjWasRemoved(work))
if (P_MobjWasRemoved(work))
return;
flip = P_MobjFlip(player->mo);
@@ -4432,7 +4434,7 @@ void K_DropItems(player_t *player)
K_DropHnextList(player);
if (player->mo && !P_MobjWasRemoved(player->mo) && player->kartstuff[k_itemamount])
if (!P_MobjWasRemoved(player->mo) && player->kartstuff[k_itemamount])
{
mobj_t *drop = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z + player->mo->height/2, MT_FLOATINGITEM);
P_SetScale(drop, drop->scale>>4);
@@ -4461,7 +4463,7 @@ void K_DropRocketSneaker(player_t *player)
fixed_t flingangle;
boolean leftshoe = true; //left shoe is first
if (!(player->mo && !P_MobjWasRemoved(player->mo) && player->mo->hnext && !P_MobjWasRemoved(player->mo->hnext)))
if (!(!P_MobjWasRemoved(player->mo) && player->mo->hnext && !P_MobjWasRemoved(player->mo->hnext)))
return;
while ((shoe = shoe->hnext) && !P_MobjWasRemoved(shoe))
@@ -4500,7 +4502,7 @@ void K_DropRocketSneaker(player_t *player)
void K_DropKitchenSink(player_t *player)
{
if (!(player->mo && !P_MobjWasRemoved(player->mo) && player->mo->hnext && !P_MobjWasRemoved(player->mo->hnext)))
if (!(!P_MobjWasRemoved(player->mo) && player->mo->hnext && !P_MobjWasRemoved(player->mo->hnext)))
return;
if (player->mo->hnext->type != MT_SINK_SHIELD)
@@ -4517,13 +4519,13 @@ void K_RepairOrbitChain(mobj_t *orbit)
mobj_t *cachenext = orbit->hnext;
// First, repair the chain
if (orbit->hnext && orbit->hnext->health && !P_MobjWasRemoved(orbit->hnext))
if (!P_MobjWasRemoved(orbit->hnext) && orbit->hnext->health)
{
P_SetTarget(&orbit->hnext->hprev, orbit->hprev);
P_SetTarget(&orbit->hnext, NULL);
}
if (orbit->hprev && orbit->hprev->health && !P_MobjWasRemoved(orbit->hprev))
if (!P_MobjWasRemoved(orbit->hprev) && orbit->hprev->health)
{
P_SetTarget(&orbit->hprev->hnext, cachenext);
P_SetTarget(&orbit->hprev, NULL);
@@ -4538,7 +4540,7 @@ void K_RepairOrbitChain(mobj_t *orbit)
mobj_t *cur = orbit->target->hnext;
mobj_t *prev = NULL;
while (cur && !P_MobjWasRemoved(cur))
while (!P_MobjWasRemoved(cur))
{
prev = cur;
cur = cur->hnext;
@@ -4738,7 +4740,7 @@ static void K_MoveHeldObjects(player_t *player)
player->kartstuff[k_bananadrag] = 0; // Just to make sure
while (cur && !P_MobjWasRemoved(cur))
while (!P_MobjWasRemoved(cur))
{
const fixed_t radius = FixedHypot(player->mo->radius, player->mo->radius) + FixedHypot(cur->radius, cur->radius); // mobj's distance from its Target, or Radius.
fixed_t z;
@@ -4816,7 +4818,7 @@ static void K_MoveHeldObjects(player_t *player)
if (P_IsObjectOnGround(player->mo) && player->speed > 0)
player->kartstuff[k_bananadrag]++;
while (cur && !P_MobjWasRemoved(cur))
while (!P_MobjWasRemoved(cur))
{
const fixed_t radius = FixedHypot(targ->radius, targ->radius) + FixedHypot(cur->radius, cur->radius);
angle_t ang;
@@ -4844,7 +4846,7 @@ static void K_MoveHeldObjects(player_t *player)
else
dist = cur->extravalue1/2;
if (!targ || P_MobjWasRemoved(targ))
if (P_MobjWasRemoved(targ))
continue;
// Shrink your items if the player shrunk too.
@@ -4902,7 +4904,7 @@ static void K_MoveHeldObjects(player_t *player)
mobj_t *cur = player->mo->hnext;
INT32 num = 0;
while (cur && !P_MobjWasRemoved(cur))
while (!P_MobjWasRemoved(cur))
{
const fixed_t radius = FixedHypot(player->mo->radius, player->mo->radius) + FixedHypot(cur->radius, cur->radius);
boolean vibrate = ((leveltime & 1) && !cur->tracer);
@@ -4967,7 +4969,7 @@ static void K_MoveHeldObjects(player_t *player)
}
if (cur->tracer && !P_MobjWasRemoved(cur->tracer))
if (!P_MobjWasRemoved(cur->tracer))
{
fixed_t diffx, diffy, diffz;
@@ -5708,7 +5710,7 @@ void K_KartPlayerAfterThink(player_t *player)
else
targ = K_FindJawzTarget(player->mo, player);
if (!targ || !targ->mo || P_MobjWasRemoved(targ->mo))
if (!targ || P_MobjWasRemoved(targ->mo))
{
player->kartstuff[k_lastjawztarget] = -1;
player->kartstuff[k_jawztargetdelay] = 0;
+7 -7
View File
@@ -181,7 +181,7 @@ static int lib_setState(lua_State *L)
switch(lua_type(L, 3))
{
case LUA_TNIL: // Null? Set the action to nothing, then.
state->action.acp1 = NULL;
state->action = NULL;
break;
case LUA_TSTRING: // It's a string, expect the name of a built-in action
LUA_SetActionByName(state, lua_tostring(L, 3));
@@ -193,7 +193,7 @@ static int lib_setState(lua_State *L)
lua_pushvalue(L, 3); // Bring it to the top of the stack
lua_rawset(L, -3); // Set it in the registry
lua_pop(L, 1); // pop LREG_STATEACTION
state->action.acp1 = (actionf_p1)A_Lua; // Set the action for the userdata.
state->action = (actionf_p1)A_Lua; // Set the action for the userdata.
break;
default: // ?!
return luaL_typerror(L, 3, "function");
@@ -251,7 +251,7 @@ boolean LUA_SetLuaAction(void *stv, const char *action)
lua_pop(gL, 1); // pop LREG_STATEACTION
lua_pop(gL, 2); // pop the function and LREG_ACTIONS
st->action.acp1 = (actionf_p1)A_Lua; // Set the action for the userdata.
st->action = (actionf_p1)A_Lua; // Set the action for the userdata.
return true; // action successfully set.
}
@@ -350,9 +350,9 @@ static int state_get(lua_State *L)
case state_action:
{
const char *name;
if (!st->action.acp1) // Action is NULL.
if (!st->action) // Action is NULL.
return 0; // return nil.
if (st->action.acp1 == (actionf_p1)A_Lua) { // This is a Lua function?
if (st->action == (actionf_p1)A_Lua) { // This is a Lua function?
lua_getfield(L, LUA_REGISTRYINDEX, LREG_STATEACTION);
I_Assert(lua_istable(L, -1));
lua_pushlightuserdata(L, st); // Push the state pointer and
@@ -428,7 +428,7 @@ static int state_set(lua_State *L)
switch(lua_type(L, 3))
{
case LUA_TNIL: // Null? Set the action to nothing, then.
st->action.acp1 = NULL;
st->action = NULL;
break;
case LUA_TSTRING: // It's a string, expect the name of a built-in action
LUA_SetActionByName(st, lua_tostring(L, 3));
@@ -440,7 +440,7 @@ static int state_set(lua_State *L)
lua_pushvalue(L, 3); // Bring it to the top of the stack
lua_rawset(L, -3); // Set it in the registry
lua_pop(L, 1); // pop LREG_STATEACTION
st->action.acp1 = (actionf_p1)A_Lua; // Set the action for the userdata.
st->action = (actionf_p1)A_Lua; // Set the action for the userdata.
break;
default: // ?!
return luaL_typerror(L, 3, "function");
+1 -1
View File
@@ -227,4 +227,4 @@ int LUA_MathLib(lua_State *L)
lua_pushvalue(L, LUA_GLOBALSINDEX);
luaL_register(L, NULL, lib);
return 0;
}
}
+8 -5
View File
@@ -1224,7 +1224,7 @@ void LUA_Archive(savebuffer_t *save, boolean network)
{
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
// archive function will determine when to skip mobjs,
@@ -1264,15 +1264,18 @@ void LUA_UnArchive(savebuffer_t *save, boolean network)
{
do {
mobjnum = READUINT32(save->p); // read a mobjnum
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
if (((mobj_t *)th)->mobjnum == mobjnum) // find matching mobj
UnArchiveExtVars(&save->p, th, network); // apply variables
if (((mobj_t *)th)->mobjnum != mobjnum) // find matching mobj
continue;
UnArchiveExtVars(&save->p, th, network); // apply variables
}
} while(mobjnum != UINT32_MAX); // repeat until end of mobjs marker.
} while (mobjnum != UINT32_MAX); // repeat until end of mobjs marker.
LUA_HookNetArchive(NetUnArchive, save); // call the NetArchive hook in unarchive mode
}
+4 -4
View File
@@ -32,7 +32,7 @@ struct iterationState {
int next;
};
static int iterationState_gc(lua_State *L)
FUNCINLINE static ATTRINLINE int iterationState_gc(lua_State *L)
{
struct iterationState *it = luaL_checkudata(L, -1, META_ITERATIONSTATE);
if (it->next != LUA_REFNIL)
@@ -44,7 +44,7 @@ static int iterationState_gc(lua_State *L)
}
#define push_thinker(th) {\
if ((th)->function.acp1 == (actionf_p1)P_MobjThinker) \
if ((th)->function == (actionf_p1)P_MobjThinker) \
LUA_PushUserdata(L, (th), META_MOBJ); \
else \
lua_pushlightuserdata(L, (th)); \
@@ -88,7 +88,7 @@ static int lib_iterateThinkers(lua_State *L)
return luaL_error(L, "next thinker invalidated during iteration");
for (; next != &thinkercap; next = next->next)
if (!it->filter || next->function.acp1 == it->filter)
if (!it->filter || next->function == it->filter)
{
push_thinker(next);
if (next->next != &thinkercap)
@@ -130,4 +130,4 @@ int LUA_ThinkerLib(lua_State *L)
lua_setfield(L, -2, "iterate");
lua_setglobal(L, "thinkers");
return 0;
}
}
+1 -1
View File
@@ -732,7 +732,7 @@ static mapthing_t *OP_CreateNewMapThing(player_t *player, UINT16 type, boolean c
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
mo = (mobj_t *)th;
+4 -1
View File
@@ -7768,7 +7768,10 @@ static void M_PlaybackRewind(INT32 choice)
S_PauseAudio();
}
else
demo.rewinding = paused = true;
{
demo.rewinding = true;
paused = true;
}
}
else if (lastconfirmtime + TICRATE/2 < I_GetTime())
{
+8 -8
View File
@@ -590,9 +590,9 @@ static void PS_CountThinkers(void)
{
ps_thinkercount.value.i++;
if (thinker->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
if (thinker->function == (actionf_p1)P_RemoveThinkerDelayed)
ps_removecount.value.i++;
else if (thinker->function.acp1 == (actionf_p1)P_MobjThinker)
else if (thinker->function == (actionf_p1)P_MobjThinker)
{
mobj_t *mobj = (mobj_t*)thinker;
ps_mobjcount.value.i++;
@@ -609,7 +609,7 @@ static void PS_CountThinkers(void)
for (thinker = precipcap.next; thinker != &precipcap; thinker = thinker->next)
{
if (thinker->function.acp1 != (actionf_p1)P_NullPrecipThinker)
if (thinker->function != (actionf_p1)P_NullPrecipThinker)
continue; // not a precipmobj thinker
ps_precipcount.value.i++;
@@ -620,7 +620,7 @@ static void PS_CountThinkers(void)
for (thinker = thlist[i].next; thinker != &thlist[i]; thinker = thinker->next)
{
ps_thinkercount.value.i++;
if (thinker->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
if (thinker->function == (actionf_p1)P_RemoveThinkerDelayed)
ps_removecount.value.i++;
else if (i == THINK_POLYOBJ)
ps_polythcount.value.i++;
@@ -628,7 +628,7 @@ static void PS_CountThinkers(void)
ps_mainthcount.value.i++;
else if (i == THINK_MOBJ)
{
if (thinker->function.acp1 == (actionf_p1)P_MobjThinker)
if (thinker->function == (actionf_p1)P_MobjThinker)
{
mobj_t *mobj = (mobj_t*)thinker;
ps_mobjcount.value.i++;
@@ -739,7 +739,7 @@ static void PS_DrawDescriptorHeader(void)
int samples_left = max(ps_frame_samples_left, ps_tick_samples_left);
int x, y;
if (cv_perfstats.value >= 3)
if (cv_perfstats.value >= 3)
{
x = 2;
y = 0;
@@ -892,7 +892,7 @@ static void draw_think_frame_stats(int hook_length, ps_hookinfo_t *hook)
PS_DrawDescriptorHeader();
for (i = 0; i < hook_length; i++)
for (i = 0; i < hook_length; i++)
{
#define NEXT_ROW() y += HEIGHT;
@@ -1010,7 +1010,7 @@ void M_DrawPerfStats(void)
// tics when frame skips happen
PS_DrawGameLogicStats();
}
else if (cv_perfstats.value >= 3) // lua thinkframe
else if (cv_perfstats.value >= 3) // lua thinkframe
{
if (!PS_IsLevelActive())
return;
+2 -2
View File
@@ -412,7 +412,7 @@ INT32 EV_DoCeiling(line_t *line, ceiling_e type)
ceiling = Z_Calloc(sizeof (*ceiling), PU_LEVSPEC, NULL);
P_AddThinker(&ceiling->thinker);
sec->ceilingdata = ceiling;
ceiling->thinker.function.acp1 = (actionf_p1)T_MoveCeiling;
ceiling->thinker.function = (actionf_p1)T_MoveCeiling;
ceiling->sector = sec;
ceiling->crush = false;
ceiling->sourceline = (INT32)(line-lines);
@@ -635,7 +635,7 @@ INT32 EV_DoCrush(line_t *line, ceiling_e type)
ceiling = Z_Calloc(sizeof (*ceiling), PU_LEVSPEC, NULL);
P_AddThinker(&ceiling->thinker);
sec->ceilingdata = ceiling;
ceiling->thinker.function.acp1 = (actionf_p1)T_CrushCeiling;
ceiling->thinker.function = (actionf_p1)T_CrushCeiling;
ceiling->sector = sec;
ceiling->crush = true;
ceiling->sourceline = (INT32)(line-lines);
+1007 -884
View File
File diff suppressed because it is too large. Load diff
+7 -7
View File
@@ -2483,7 +2483,7 @@ void T_CameraScanner(elevator_t *elevator)
for (UINT8 i = 0; i <= splitscreen; i++)
{
if (!players[displayplayers[i]].mo || P_MobjWasRemoved(players[displayplayers[i]].mo))
if (P_MobjWasRemoved(players[displayplayers[i]].mo))
continue;
if (players[displayplayers[i]].mo->subsector->sector == elevator->actionsector)
@@ -2545,7 +2545,7 @@ INT32 EV_DoFloor(line_t *line, floor_e floortype)
sec->floordata = dofloor;
// set up some generic aspects of the floormove_t
dofloor->thinker.function.acp1 = (actionf_p1)T_MoveFloor;
dofloor->thinker.function = (actionf_p1)T_MoveFloor;
dofloor->type = floortype;
dofloor->crush = false; // default: types that crush will change this
dofloor->sector = sec;
@@ -2766,7 +2766,7 @@ INT32 EV_DoElevator(line_t *line, elevator_e elevtype, boolean customspeed)
P_AddThinker(&elevator->thinker);
sec->floordata = elevator;
sec->ceilingdata = elevator;
elevator->thinker.function.acp1 = (actionf_p1)T_MoveElevator;
elevator->thinker.function = (actionf_p1)T_MoveElevator;
elevator->type = elevtype;
elevator->sourceline = line;
elevator->distance = 1; // Always crush unless otherwise
@@ -2954,7 +2954,7 @@ INT32 EV_BounceSector(sector_t *sec, fixed_t momz, line_t *sourceline)
bouncer = Z_Calloc(sizeof (*bouncer), PU_LEVSPEC, NULL);
P_AddThinker(&bouncer->thinker);
sec->ceilingdata = bouncer;
bouncer->thinker.function.acp1 = (actionf_p1)T_BounceCheese;
bouncer->thinker.function = (actionf_p1)T_BounceCheese;
// set up the fields according to the type of elevator action
bouncer->sector = sec;
@@ -2991,7 +2991,7 @@ INT32 EV_DoContinuousFall(sector_t *sec, sector_t *backsector, fixed_t spd, bool
// create and initialize new thinker
faller = Z_Calloc(sizeof (*faller), PU_LEVSPEC, NULL);
P_AddThinker(&faller->thinker);
faller->thinker.function.acp1 = (actionf_p1)T_ContinuousFalling;
faller->thinker.function = (actionf_p1)T_ContinuousFalling;
// set up the fields
faller->sector = sec;
@@ -3044,7 +3044,7 @@ INT32 EV_StartCrumble(sector_t *sec, ffloor_t *rover, boolean floating,
// create and initialize new elevator thinker
elevator = Z_Calloc(sizeof (*elevator), PU_LEVSPEC, NULL);
P_AddThinker(&elevator->thinker);
elevator->thinker.function.acp1 = (actionf_p1)T_StartCrumble;
elevator->thinker.function = (actionf_p1)T_StartCrumble;
// Does this crumbler return?
if (crumblereturn)
@@ -3123,7 +3123,7 @@ INT32 EV_MarioBlock(sector_t *sec, sector_t *roversector, fixed_t topheight, mob
P_AddThinker(&block->thinker);
sec->floordata = block;
sec->ceilingdata = block;
block->thinker.function.acp1 = (actionf_p1)T_MarioBlock;
block->thinker.function = (actionf_p1)T_MarioBlock;
// Set up the fields
block->sector = sec;
+8 -8
View File
@@ -473,7 +473,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
if (player->spectator)
return;
if (special->tracer && !P_MobjWasRemoved(special->tracer) && toucher == special->tracer)
if (!P_MobjWasRemoved(special->tracer) && toucher == special->tracer)
{
mobj_t *spbexplode;
@@ -487,7 +487,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
spbexplode = P_SpawnMobj(toucher->x, toucher->y, toucher->z, MT_SPBEXPLOSION);
spbexplode->extravalue1 = 1; // Tell K_ExplodePlayer to use extra knockback
if (special->target && !P_MobjWasRemoved(special->target))
if (!P_MobjWasRemoved(special->target))
P_SetTarget(&spbexplode->target, special->target);
P_RemoveMobj(special);
@@ -496,7 +496,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
K_SpinPlayer(player, special->target, 0, special, false);
return;
case MT_SMK_MOLE:
if (special->target && !P_MobjWasRemoved(special->target))
if (!P_MobjWasRemoved(special->target))
return;
if (special->health <= 0 || toucher->health <= 0)
@@ -961,7 +961,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
// scan the remaining thinkers to find koopa
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
mo2 = (mobj_t *)th;
@@ -1765,7 +1765,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
case MT_SMK_ICEBLOCK:
{
mobj_t *cur = target->hnext;
while (cur && !P_MobjWasRemoved(cur))
while (!P_MobjWasRemoved(cur))
{
P_SetMobjState(cur, S_SMK_ICEBLOCK2);
cur = cur->hnext;
@@ -1816,7 +1816,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
// this can happen if the boss was hurt earlier than expected
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
mo = (mobj_t *)th;
@@ -1838,14 +1838,14 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
// kill tracer
if (target->type == MT_FROGGER)
{
if (target->tracer && !P_MobjWasRemoved(target->tracer))
if (!P_MobjWasRemoved(target->tracer))
P_KillMobj(target->tracer, inflictor, source);
}
if (target->type == MT_FROGGER || target->type == MT_ROBRA_HEAD || target->type == MT_BLUEROBRA_HEAD) // clean hnext list
{
mobj_t *cur = target->hnext;
while (cur && !P_MobjWasRemoved(cur))
while (!P_MobjWasRemoved(cur))
{
P_KillMobj(cur, inflictor, source);
cur = cur->hnext;
+6 -6
View File
@@ -78,7 +78,7 @@ fireflicker_t *P_SpawnAdjustableFireFlicker(sector_t *minsector, sector_t *maxse
P_AddThinker(&flick->thinker);
flick->thinker.function.acp1 = (actionf_p1)T_FireFlicker;
flick->thinker.function = (actionf_p1)T_FireFlicker;
flick->sector = maxsector;
flick->maxlight = maxsector->lightlevel;
flick->minlight = minsector->lightlevel;
@@ -140,7 +140,7 @@ void P_SpawnLightningFlash(sector_t *sector)
if (sector->lightingdata)
{
if (((lightflash_t *)sector->lightingdata)->thinker.function.acp1
if (((lightflash_t *)sector->lightingdata)->thinker.function
== (actionf_p1)T_LightningFlash)
{
// lightning was already flashing in this sector
@@ -157,7 +157,7 @@ void P_SpawnLightningFlash(sector_t *sector)
P_AddThinker(&flash->thinker);
flash->thinker.function.acp1 = (actionf_p1)T_LightningFlash;
flash->thinker.function = (actionf_p1)T_LightningFlash;
flash->sector = sector;
flash->maxlight = 255;
flash->minlight = minlight;
@@ -219,7 +219,7 @@ strobe_t *P_SpawnAdjustableStrobeFlash(sector_t *minsector, sector_t *maxsector,
flash->sector = maxsector;
flash->darktime = darktime;
flash->brighttime = brighttime;
flash->thinker.function.acp1 = (actionf_p1)T_StrobeFlash;
flash->thinker.function = (actionf_p1)T_StrobeFlash;
flash->maxlight = maxsector->lightlevel;
flash->minlight = minsector->lightlevel;
@@ -301,7 +301,7 @@ glow_t *P_SpawnAdjustableGlowingLight(sector_t *minsector, sector_t *maxsector,
g->minlight = g->maxlight;
g->maxlight = oops;
}
g->thinker.function.acp1 = (actionf_p1)T_Glow;
g->thinker.function = (actionf_p1)T_Glow;
g->direction = 1;
g->speed = length/4;
if (g->speed > (g->maxlight - g->minlight)/2) // don't make it ridiculous speed
@@ -347,7 +347,7 @@ void P_FadeLight(INT16 tag, INT32 destvalue, INT32 speed)
P_RemoveLighting(sector); // remove the old lighting effect first
ll = Z_Calloc(sizeof (*ll), PU_LEVSPEC, NULL);
ll->thinker.function.acp1 = (actionf_p1)T_LightFade;
ll->thinker.function = (actionf_p1)T_LightFade;
sector->lightingdata = ll; // set it to the lightlevel_t
P_AddThinker(&ll->thinker); // add thinker
+1 -1
View File
@@ -279,7 +279,7 @@ void P_SceneryThinker(mobj_t *mobj);
// To test it in Lua, check mobj.valid
FUNCINLINE static ATTRINLINE boolean P_MobjWasRemoved(const mobj_t *mobj)
{
return (!mobj || mobj->thinker.function.acp1 != (actionf_p1)P_MobjThinker);
return (!mobj || mobj->thinker.function != (actionf_p1)P_MobjThinker);
}
fixed_t P_MobjFloorZ(mobj_t *mobj, sector_t *sector, sector_t *boundsec, fixed_t x, fixed_t y, line_t *line, boolean lowest, boolean perfect);
+2 -2
View File
@@ -321,7 +321,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
return true;
// Ignore... things.
if (!tmthing || !thing || P_MobjWasRemoved(thing))
if (!tmthing || P_MobjWasRemoved(thing))
return true;
I_Assert(!P_MobjWasRemoved(tmthing));
@@ -3626,7 +3626,7 @@ static boolean PIT_ChangeSector(mobj_t *thing, boolean realcrush)
for (think = thinkercap.next; think != &thinkercap; think = think->next)
{
if (think->function.acp1 != (actionf_p1)T_StartCrumble)
if (think->function != (actionf_p1)T_StartCrumble)
continue;
crumbler = (elevator_t *)think;
+55 -53
View File
@@ -67,8 +67,8 @@ void P_RunCachedActions(void)
var2 = states[ac->statenum].var2;
astate = &states[ac->statenum];
if (ac->mobj && !P_MobjWasRemoved(ac->mobj)) // just in case...
states[ac->statenum].action.acp1(ac->mobj);
if (!P_MobjWasRemoved(ac->mobj)) // just in case...
states[ac->statenum].action(ac->mobj);
next = ac->next;
Z_Free(ac);
}
@@ -220,13 +220,13 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
// Modified handling.
// Call action functions when the state is set
if (st->action.acp1)
if (st->action)
{
var1 = st->var1;
var2 = st->var2;
astate = st;
st->action.acp1(mobj);
st->action(mobj);
// woah. a player was removed by an action.
// this sounds like a VERY BAD THING, but there's nothing we can do now...
@@ -290,13 +290,13 @@ boolean P_SetMobjState(mobj_t *mobj, statenum_t state)
// Modified handling.
// Call action functions when the state is set
if (st->action.acp1)
if (st->action)
{
var1 = st->var1;
var2 = st->var2;
astate = st;
st->action.acp1(mobj);
st->action(mobj);
if (P_MobjWasRemoved(mobj))
return false;
}
@@ -3186,7 +3186,7 @@ void P_DestroyRobots(void)
for (think = thinkercap.next; think != &thinkercap; think = think->next)
{
if (think->function.acp1 != (actionf_p1)P_MobjThinker)
if (think->function != (actionf_p1)P_MobjThinker)
continue; // not a mobj thinker
mo = (mobj_t *)think;
@@ -3221,7 +3221,7 @@ void P_CalcChasePostImg(player_t *player, camera_t *thiscam)
}
#endif
if (player->awayviewtics && player->awayviewmobj && !P_MobjWasRemoved(player->awayviewmobj)) // Camera must obviously exist
if (player->awayviewtics && !P_MobjWasRemoved(player->awayviewmobj)) // Camera must obviously exist
{
camera_t dummycam;
@@ -3267,7 +3267,7 @@ boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled
{
mobj_t dummy;
dummy.thinker.function.acp1 = (actionf_p1)P_MobjThinker;
dummy.thinker.function = (actionf_p1)P_MobjThinker;
dummy.subsector = thiscam->subsector;
dummy.x = thiscam->x;
dummy.y = thiscam->y;
@@ -3707,7 +3707,7 @@ boolean P_BossTargetPlayer(mobj_t *actor, boolean closest)
if (player->pflags & PF_INVIS || player->bot || player->spectator)
continue; // ignore notarget
if (!player->mo || P_MobjWasRemoved(player->mo))
if (P_MobjWasRemoved(player->mo))
continue;
if (!P_CheckSight(actor, player->mo))
@@ -4003,7 +4003,7 @@ static void P_Boss3Thinker(mobj_t *mobj)
// this can happen if the boss was hurt earlier than expected
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
mo2 = (mobj_t *)th;
@@ -4096,7 +4096,7 @@ static void P_Boss3Thinker(mobj_t *mobj)
// the number
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
mo2 = (mobj_t *)th;
@@ -4722,7 +4722,7 @@ static void P_Boss7Thinker(mobj_t *mobj)
// Find waypoint he is closest to
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
mo2 = (mobj_t *)th;
@@ -4777,7 +4777,7 @@ static void P_Boss7Thinker(mobj_t *mobj)
// the waypoint to use
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
mo2 = (mobj_t *)th;
@@ -4899,7 +4899,7 @@ static void P_Boss9Thinker(mobj_t *mobj)
// Build a hoop linked list of 'em!
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
mo2 = (mobj_t *)th;
@@ -5362,7 +5362,7 @@ mobj_t *P_GetClosestAxis(mobj_t *source)
// scan the thinkers to find the closest axis point
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
mo2 = (mobj_t *)th;
@@ -5799,7 +5799,7 @@ void P_RunShadows(void)
next = mobj->hnext;
P_SetTarget(&mobj->hnext, NULL);
if (!mobj->target || P_MobjWasRemoved(mobj->target))
if (P_MobjWasRemoved(mobj->target))
{
mobj->flags2 |= MF2_DONTDRAW;
continue; // shouldn't you already be dead?
@@ -5902,7 +5902,7 @@ static void P_RemoveShadow(mobj_t *thing)
}
}
void A_BossDeath(mobj_t *mo);
void A_BossDeath(void *thing);
// AI for the Koopa boss.
static void P_KoopaThinker(mobj_t *koopa)
{
@@ -6712,7 +6712,7 @@ static void P_MobjSceneryThink(mobj_t *mobj)
}
break;
case MT_FIREDITEM:
if (mobj->target && !P_MobjWasRemoved(mobj->target))
if (!P_MobjWasRemoved(mobj->target))
{
fixed_t x, y, z;
if (mobj->movecount)
@@ -7308,7 +7308,9 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
else // Not NiGHTS
mobj->flags2 &= ~MF2_DONTDRAW;
}
mobj->angle += ANG10;
if (mobj->z <= mobj->floorz)
mobj->momz = 5*FRACUNIT;
}
@@ -7833,7 +7835,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
P_MoveOrigin(mobj, mobj->target->x, mobj->target->y, mobj->target->z);
break;
case MT_BATTLEPOINT:
if (!mobj->target || P_MobjWasRemoved(mobj->target))
if (P_MobjWasRemoved(mobj->target))
{
P_RemoveMobj(mobj);
return false;
@@ -7976,7 +7978,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
const fixed_t rad = FixedMul(mobjinfo[MT_PLAYER].radius, mobj->target->scale);
mobj_t *cur = mobj->hnext;
while (cur && !P_MobjWasRemoved(cur))
while (!P_MobjWasRemoved(cur))
{
fixed_t offx = rad;
fixed_t offy = rad;
@@ -8112,7 +8114,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
{
mobj_t *cur = mobj->hnext;
while (cur && !P_MobjWasRemoved(cur))
while (!P_MobjWasRemoved(cur))
{
cur->angle += FixedAngle(mobj->info->speed);
P_MoveOrigin(cur, mobj->x + FINECOSINE((cur->angle*8)>>ANGLETOFINESHIFT),
@@ -8144,7 +8146,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
if (mobj->hnext) // Clean hnext list
{
mobj_t *cur = mobj->hnext;
while (cur && !P_MobjWasRemoved(cur))
while (!P_MobjWasRemoved(cur))
{
mobj_t *next = cur->hnext;
P_RemoveMobj(cur);
@@ -8172,7 +8174,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
}
else if (frogstate == S_FROGGER_ATTACK)
{
if (!mobj->tracer || P_MobjWasRemoved(mobj->tracer))
if (P_MobjWasRemoved(mobj->tracer))
{
mobj->reactiontime = mobj->info->reactiontime;
P_SetMobjState(mobj, S_FROGGER);
@@ -8222,7 +8224,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
if (mobj->hnext) // Clean hnext list
{
mobj_t *cur = mobj->hnext;
while (cur && !P_MobjWasRemoved(cur))
while (!P_MobjWasRemoved(cur))
{
mobj_t *next = cur->hnext;
P_RemoveMobj(cur);
@@ -8247,7 +8249,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
fixed_t wy = mobj->tracer->y + (joint * (mobj->y - mobj->tracer->y) / (numjoints+1));
fixed_t wz = mobj->tracer->z + (joint * ((mobj->z + (mobj->height/2)) - mobj->tracer->z) / (numjoints+1));
if (cur && !P_MobjWasRemoved(cur))
if (!P_MobjWasRemoved(cur))
P_MoveOrigin(cur, wx, wy, wz);
else
cur = P_SpawnMobj(wx, wy, wz, MT_FROGTONGUE_JOINT);
@@ -8312,14 +8314,14 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
}
}
if ((mobj->extravalue1) && !(mobj->tracer && !P_MobjWasRemoved(mobj->tracer)))
if (mobj->extravalue1 && P_MobjWasRemoved(mobj->tracer))
{
mobj->reactiontime = 20*mobj->info->reactiontime;
P_SetTarget(&mobj->target, NULL);
mobj->extravalue1 = 0;
}
if ((mobj->tracer && !P_MobjWasRemoved(mobj->tracer)) && !(leveltime % 10))
if (!P_MobjWasRemoved(mobj->tracer) && !(leveltime % 10))
{
mobj_t *dust = P_SpawnMobj(mobj->x + (P_RandomRange(-4, 4)<<FRACBITS),
mobj->y + (P_RandomRange(-4, 4)<<FRACBITS),
@@ -8349,7 +8351,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
{
fixed_t segz = mobj->z - ((i+1) * (32 * mobj->scale));
if (cur && !P_MobjWasRemoved(cur))
if (!P_MobjWasRemoved(cur))
{
if (i >= locnumsegs) // Remove extras
{
@@ -8405,7 +8407,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
break;
case MT_ROBRA_JOINT:
case MT_BLUEROBRA_JOINT:
if (!mobj->target || P_MobjWasRemoved(mobj->target))
if (P_MobjWasRemoved(mobj->target))
{
P_RemoveMobj(mobj);
return false;
@@ -8418,7 +8420,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
P_SetMobjStateNF(mobj, mobj->info->spawnstate);
break;
case MT_SMK_MOLESPAWNER:
if (!mobj->target || P_MobjWasRemoved(mobj->target))
if (P_MobjWasRemoved(mobj->target))
{
mobj_t *newmole = P_SpawnMobj(mobj->x, mobj->y, mobj->z, MT_SMK_MOLE);
P_SetTarget(&mobj->target, newmole);
@@ -8426,7 +8428,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
}
break;
case MT_SMK_MOLE:
if (mobj->target && !P_MobjWasRemoved(mobj->target) && mobj->target->player)
if (!P_MobjWasRemoved(mobj->target) && mobj->target->player)
{
player_t *player = mobj->target->player;
@@ -8813,7 +8815,7 @@ static void P_IceBlockFuseThink(mobj_t *mobj)
S_StartSound(debris, sfx_s3k82);
}
while (cur && !P_MobjWasRemoved(cur))
while (!P_MobjWasRemoved(cur))
{
next = cur->hnext;
P_RemoveMobj(cur);
@@ -8919,11 +8921,11 @@ static boolean P_MobjPushableThink(mobj_t *mobj)
static void P_FiringThink(mobj_t *mobj)
{
if (mobj->state->action.acp1 == (actionf_p1)A_Boss1Laser)
if (mobj->state->action == (actionf_p1)A_Boss1Laser)
{
var1 = mobj->state->var1;
var2 = mobj->state->var2;
mobj->state->action.acp1(mobj);
mobj->state->action(mobj);
}
else if (leveltime & 1) // Fire mode
{
@@ -8998,7 +9000,7 @@ void P_MobjThinker(mobj_t *mobj)
P_MobjScaleThink(mobj); // Slowly scale up/down to reach your destscale.
if (mobj->type == MT_GHOST && mobj->fuse > 0 // Not guaranteed to be MF_SCENERY or not MF_SCENERY!
&& (signed)(mobj->frame >> FF_TRANSSHIFT) < (NUMTRANSMAPS-1) - mobj->fuse / 2)
&& (signed)((mobj->frame & FF_TRANSMASK) >> FF_TRANSSHIFT) < (NUMTRANSMAPS-1) - mobj->fuse / 2)
// fade out when nearing the end of fuse...
mobj->frame = (mobj->frame & ~FF_TRANSMASK) | (((NUMTRANSMAPS-1) - mobj->fuse / 2) << FF_TRANSSHIFT);
@@ -9102,7 +9104,7 @@ void P_MobjThinker(mobj_t *mobj)
|| mobj->type == MT_FLINGEMERALD
|| mobj->type == MT_BIGTUMBLEWEED
|| mobj->type == MT_LITTLETUMBLEWEED
|| mobj->type == MT_CANNONBALLDECOR)
|| mobj->type == MT_CANNONBALLDECOR
|| mobj->type == MT_FALLINGROCK)
{
P_TryMove(mobj, mobj->x, mobj->y, true); // Sets mo->standingslope correctly
@@ -9381,7 +9383,7 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
mobj = P_AllocMobj();
// this is officially a mobj, declared as soon as possible.
mobj->thinker.function.acp1 = (actionf_p1)P_MobjThinker;
mobj->thinker.function = (actionf_p1)P_MobjThinker;
mobj->type = type;
mobj->info = info;
@@ -9527,7 +9529,7 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
ball->threshold = ball->radius + mobj->radius + FixedMul(ball->info->painchance, ball->scale);
var1 = ball->state->var1, var2 = ball->state->var2;
ball->state->action.acp1(ball);
ball->state->action(ball);
}
break;
}
@@ -9787,7 +9789,7 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
}
// Call action functions when the state is set
if (st->action.acp1 && (mobj->flags & MF_RUNSPAWNFUNC))
if (st->action && (mobj->flags & MF_RUNSPAWNFUNC))
{
if (levelloading)
{
@@ -9803,7 +9805,7 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
var2 = st->var2;
astate = st;
st->action.acp1(mobj);
st->action(mobj);
// DANGER! This can cause P_SpawnMobj to return NULL!
// Avoid using MF_RUNSPAWNFUNC on mobjs whose spawn state expects target or tracer to already be set!
if (P_MobjWasRemoved(mobj))
@@ -9832,7 +9834,7 @@ mobj_t *P_SpawnShadowMobj(mobj_t * caster)
mobj = P_AllocMobj();
// this is officially a mobj, declared as soon as possible.
mobj->thinker.function.acp1 = (actionf_p1)P_MobjThinker;
mobj->thinker.function = (actionf_p1)P_MobjThinker;
mobj->type = MT_SHADOW;
mobj->info = info;
@@ -9903,7 +9905,7 @@ mobj_t *P_SpawnShadowMobj(mobj_t * caster)
P_AddThinker(&mobj->thinker);
// Call action functions when the state is set
if (st->action.acp1 && (mobj->flags & MF_RUNSPAWNFUNC))
if (st->action && (mobj->flags & MF_RUNSPAWNFUNC))
{
if (levelloading)
{
@@ -9919,7 +9921,7 @@ mobj_t *P_SpawnShadowMobj(mobj_t * caster)
var2 = st->var2;
astate = st;
st->action.acp1(mobj);
st->action(mobj);
// DANGER! This is the ONLY way for P_SpawnMobj to return NULL!
// Avoid using MF_RUNSPAWNFUNC on mobjs whose spawn state expects target or tracer to already be set!
if (P_MobjWasRemoved(mobj))
@@ -9970,7 +9972,7 @@ static precipmobj_t *P_SpawnPrecipMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype
mobj->z = z;
mobj->momz = cv_mobjscaleprecip.value ? FixedMul(info->speed, mapobjectscale) : info->speed;
mobj->thinker.function.acp1 = (actionf_p1)P_NullPrecipThinker;
mobj->thinker.function = (actionf_p1)P_NullPrecipThinker;
P_AddPrecipThinker(&mobj->thinker);
P_CalculatePrecipFloor(mobj, true);
@@ -10006,9 +10008,9 @@ void P_RemoveMobj(mobj_t *mobj)
if (P_MobjWasRemoved(mobj))
return; // something already removing this mobj.
mobj->thinker.function.acp1 = (actionf_p1)P_RemoveThinkerDelayed; // shh. no recursing.
mobj->thinker.function = (actionf_p1)P_RemoveThinkerDelayed; // shh. no recursing.
LUA_HookMobj(mobj, MOBJ_HOOK(MobjRemoved));
mobj->thinker.function.acp1 = (actionf_p1)P_MobjThinker; // needed for P_UnsetThingPosition, etc. to work.
mobj->thinker.function = (actionf_p1)P_MobjThinker; // needed for P_UnsetThingPosition, etc. to work.
// Rings only, please!
if (UNLIKELY(mobj->spawnpoint &&
@@ -10032,7 +10034,7 @@ void P_RemoveMobj(mobj_t *mobj)
{
mobj_t *cur = mobj->hnext;
while (cur && !P_MobjWasRemoved(cur))
while (!P_MobjWasRemoved(cur))
{
mobj_t *prev = cur; // Kind of a dumb var, but we need to set cur before we remove the mobj
cur = cur->hnext;
@@ -10075,13 +10077,13 @@ void P_RemoveMobj(mobj_t *mobj)
// repair hnext chain
mobj_t *cachenext = mobj->hnext;
if (mobj->hnext && !P_MobjWasRemoved(mobj->hnext))
if (!P_MobjWasRemoved(mobj->hnext))
{
P_SetTarget(&mobj->hnext->hprev, mobj->hprev);
P_SetTarget(&mobj->hnext, NULL);
}
if (mobj->hprev && !P_MobjWasRemoved(mobj->hprev))
if (!P_MobjWasRemoved(mobj->hprev))
{
P_SetTarget(&mobj->hprev->hnext, cachenext);
P_SetTarget(&mobj->hprev, NULL);
@@ -10409,7 +10411,7 @@ void P_RespawnSpecials(void)
mobj_t *box;
mobj_t *newmobj;
if (th->function.acp1 != (actionf_p1)P_MobjThinker) // not a mobj
if (th->function != (actionf_p1)P_MobjThinker) // not a mobj
continue;
box = (mobj_t *)th;
@@ -11265,7 +11267,7 @@ void P_SpawnMapThing(mapthing_t *mthing)
mobj = P_SpawnMobj(x, y, z, i);
if (!mobj || P_MobjWasRemoved(mobj))
if (P_MobjWasRemoved(mobj))
{
CONS_Alert(CONS_ERROR, "Failed to spawn map thing #%d at %d, %d. This will crash vanilla clients!\n", mthing->type, x>>FRACBITS, y>>FRACBITS);
return;
@@ -11586,7 +11588,7 @@ ML_NOCLIMB : Direction not controllable
// See if other starposts exist in this level that have the same value.
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
mo2 = (mobj_t *)th;
+13 -13
View File
@@ -1557,7 +1557,7 @@ void Polyobj_InitLevel(void)
// the mobj_t pointers on a queue for use below.
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
mobj_t *mo = (mobj_t *)th;
@@ -1832,7 +1832,7 @@ void T_PolyObjWaypoint(polywaypoint_t *th)
// We redo this each tic to make savegame compatibility easier.
for (wp = thinkercap.next; wp != &thinkercap; wp = wp->next)
{
if (wp->function.acp1 != (actionf_p1)P_MobjThinker) // Not a mobj thinker
if (wp->function != (actionf_p1)P_MobjThinker) // Not a mobj thinker
continue;
mo2 = (mobj_t *)wp;
@@ -1916,7 +1916,7 @@ void T_PolyObjWaypoint(polywaypoint_t *th)
// Find next waypoint
for (wp = thinkercap.next; wp != &thinkercap; wp = wp->next)
{
if (wp->function.acp1 != (actionf_p1)P_MobjThinker) // Not a mobj thinker
if (wp->function != (actionf_p1)P_MobjThinker) // Not a mobj thinker
continue;
mo2 = (mobj_t *)wp;
@@ -1955,7 +1955,7 @@ void T_PolyObjWaypoint(polywaypoint_t *th)
for (wp = thinkercap.next; wp != &thinkercap; wp = wp->next)
{
if (wp->function.acp1 != (actionf_p1)P_MobjThinker) // Not a mobj thinker
if (wp->function != (actionf_p1)P_MobjThinker) // Not a mobj thinker
continue;
mo2 = (mobj_t *)wp;
@@ -1992,7 +1992,7 @@ void T_PolyObjWaypoint(polywaypoint_t *th)
for (wp = thinkercap.next; wp != &thinkercap; wp = wp->next)
{
if (wp->function.acp1 != (actionf_p1)P_MobjThinker) // Not a mobj thinker
if (wp->function != (actionf_p1)P_MobjThinker) // Not a mobj thinker
continue;
mo2 = (mobj_t *)wp;
@@ -2357,7 +2357,7 @@ INT32 EV_DoPolyObjRotate(polyrotdata_t *prdata)
// create a new thinker
th = Z_Malloc(sizeof(polyrotate_t), PU_LEVSPEC, NULL);
th->thinker.function.acp1 = (actionf_p1)T_PolyObjRotate;
th->thinker.function = (actionf_p1)T_PolyObjRotate;
PolyObj_AddThinker(&th->thinker);
po->thinker = &th->thinker;
@@ -2425,7 +2425,7 @@ INT32 EV_DoPolyObjMove(polymovedata_t *pmdata)
// create a new thinker
th = Z_Malloc(sizeof(polymove_t), PU_LEVSPEC, NULL);
th->thinker.function.acp1 = (actionf_p1)T_PolyObjMove;
th->thinker.function = (actionf_p1)T_PolyObjMove;
PolyObj_AddThinker(&th->thinker);
po->thinker = &th->thinker;
@@ -2491,7 +2491,7 @@ INT32 EV_DoPolyObjWaypoint(polywaypointdata_t *pwdata)
// create a new thinker
th = Z_Malloc(sizeof(polywaypoint_t), PU_LEVSPEC, NULL);
th->thinker.function.acp1 = (actionf_p1)T_PolyObjWaypoint;
th->thinker.function = (actionf_p1)T_PolyObjWaypoint;
PolyObj_AddThinker(&th->thinker);
po->thinker = &th->thinker;
@@ -2512,7 +2512,7 @@ INT32 EV_DoPolyObjWaypoint(polywaypointdata_t *pwdata)
// Find the first waypoint we need to use
for (wp = thinkercap.next; wp != &thinkercap; wp = wp->next)
{
if (wp->function.acp1 != (actionf_p1)P_MobjThinker) // Not a mobj thinker
if (wp->function != (actionf_p1)P_MobjThinker) // Not a mobj thinker
continue;
mo2 = (mobj_t *)wp;
@@ -2627,7 +2627,7 @@ static void Polyobj_doSlideDoor(polyobj_t *po, polydoordata_t *doordata)
// allocate and add a new slide door thinker
th = Z_Malloc(sizeof(polyslidedoor_t), PU_LEVSPEC, NULL);
th->thinker.function.acp1 = (actionf_p1)T_PolyDoorSlide;
th->thinker.function = (actionf_p1)T_PolyDoorSlide;
PolyObj_AddThinker(&th->thinker);
// point the polyobject to this thinker
@@ -2678,7 +2678,7 @@ static void Polyobj_doSwingDoor(polyobj_t *po, polydoordata_t *doordata)
// allocate and add a new swing door thinker
th = Z_Malloc(sizeof(polyswingdoor_t), PU_LEVSPEC, NULL);
th->thinker.function.acp1 = (actionf_p1)T_PolyDoorSwing;
th->thinker.function = (actionf_p1)T_PolyDoorSwing;
PolyObj_AddThinker(&th->thinker);
// point the polyobject to this thinker
@@ -2763,7 +2763,7 @@ INT32 EV_DoPolyObjDisplace(polydisplacedata_t *prdata)
// create a new thinker
th = Z_Malloc(sizeof(polydisplace_t), PU_LEVSPEC, NULL);
th->thinker.function.acp1 = (actionf_p1)T_PolyObjDisplace;
th->thinker.function = (actionf_p1)T_PolyObjDisplace;
PolyObj_AddThinker(&th->thinker);
po->thinker = &th->thinker;
@@ -2867,7 +2867,7 @@ INT32 EV_DoPolyObjFlag(line_t *pfdata)
// create a new thinker
th = Z_Malloc(sizeof(polymove_t), PU_LEVSPEC, NULL);
th->thinker.function.acp1 = (actionf_p1)T_PolyObjFlag;
th->thinker.function = (actionf_p1)T_PolyObjFlag;
PolyObj_AddThinker(&th->thinker);
po->thinker = &th->thinker;
+67 -67
View File
@@ -1677,194 +1677,194 @@ static void P_NetArchiveThinkers(savebuffer_t *save)
// save off the current thinkers
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
continue;
numsaved++;
if (th->function.acp1 == (actionf_p1)P_MobjThinker)
if (th->function == (actionf_p1)P_MobjThinker)
{
SaveMobjThinker(save, th, tc_mobj);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_MoveCeiling)
else if (th->function == (actionf_p1)T_MoveCeiling)
{
SaveCeilingThinker(save, th, tc_ceiling);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_CrushCeiling)
else if (th->function == (actionf_p1)T_CrushCeiling)
{
SaveCeilingThinker(save, th, tc_crushceiling);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_MoveFloor)
else if (th->function == (actionf_p1)T_MoveFloor)
{
SaveFloormoveThinker(save, th, tc_floor);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_LightningFlash)
else if (th->function == (actionf_p1)T_LightningFlash)
{
SaveLightflashThinker(save, th, tc_flash);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_StrobeFlash)
else if (th->function == (actionf_p1)T_StrobeFlash)
{
SaveStrobeThinker(save, th, tc_strobe);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_Glow)
else if (th->function == (actionf_p1)T_Glow)
{
SaveGlowThinker(save, th, tc_glow);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_FireFlicker)
else if (th->function == (actionf_p1)T_FireFlicker)
{
SaveFireflickerThinker(save, th, tc_fireflicker);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_MoveElevator)
else if (th->function == (actionf_p1)T_MoveElevator)
{
SaveElevatorThinker(save, th, tc_elevator);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_ContinuousFalling)
else if (th->function == (actionf_p1)T_ContinuousFalling)
{
SaveSpecialLevelThinker(save, th, tc_continuousfalling);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_ThwompSector)
else if (th->function == (actionf_p1)T_ThwompSector)
{
SaveSpecialLevelThinker(save, th, tc_thwomp);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_NoEnemiesSector)
else if (th->function == (actionf_p1)T_NoEnemiesSector)
{
SaveSpecialLevelThinker(save, th, tc_noenemies);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_EachTimeThinker)
else if (th->function == (actionf_p1)T_EachTimeThinker)
{
SaveSpecialLevelThinker(save, th, tc_eachtime);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_RaiseSector)
else if (th->function == (actionf_p1)T_RaiseSector)
{
SaveSpecialLevelThinker(save, th, tc_raisesector);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_CameraScanner)
else if (th->function == (actionf_p1)T_CameraScanner)
{
SaveElevatorThinker(save, th, tc_camerascanner);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_Scroll)
else if (th->function == (actionf_p1)T_Scroll)
{
SaveScrollThinker(save, th, tc_scroll);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_Friction)
else if (th->function == (actionf_p1)T_Friction)
{
SaveFrictionThinker(save, th, tc_friction);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_Pusher)
else if (th->function == (actionf_p1)T_Pusher)
{
SavePusherThinker(save, th, tc_pusher);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_BounceCheese)
else if (th->function == (actionf_p1)T_BounceCheese)
{
SaveSpecialLevelThinker(save, th, tc_bouncecheese);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_StartCrumble)
else if (th->function == (actionf_p1)T_StartCrumble)
{
SaveElevatorThinker(save, th, tc_startcrumble);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_MarioBlock)
else if (th->function == (actionf_p1)T_MarioBlock)
{
SaveSpecialLevelThinker(save, th, tc_marioblock);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_MarioBlockChecker)
else if (th->function == (actionf_p1)T_MarioBlockChecker)
{
SaveSpecialLevelThinker(save, th, tc_marioblockchecker);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_SpikeSector)
else if (th->function == (actionf_p1)T_SpikeSector)
{
SaveSpecialLevelThinker(save, th, tc_spikesector);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_FloatSector)
else if (th->function == (actionf_p1)T_FloatSector)
{
SaveSpecialLevelThinker(save, th, tc_floatsector);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_BridgeThinker)
else if (th->function == (actionf_p1)T_BridgeThinker)
{
SaveSpecialLevelThinker(save, th, tc_bridgethinker);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_LaserFlash)
else if (th->function == (actionf_p1)T_LaserFlash)
{
SaveLaserThinker(save, th, tc_laserflash);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_LightFade)
else if (th->function == (actionf_p1)T_LightFade)
{
SaveLightlevelThinker(save, th, tc_lightfade);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_ExecutorDelay)
else if (th->function == (actionf_p1)T_ExecutorDelay)
{
SaveExecutorThinker(save, th, tc_executor);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_Disappear)
else if (th->function == (actionf_p1)T_Disappear)
{
SaveDisappearThinker(save, th, tc_disappear);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_PolyObjRotate)
else if (th->function == (actionf_p1)T_PolyObjRotate)
{
SavePolyrotatetThinker(save, th, tc_polyrotate);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_PolyObjMove)
else if (th->function == (actionf_p1)T_PolyObjMove)
{
SavePolymoveThinker(save, th, tc_polymove);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_PolyObjWaypoint)
else if (th->function == (actionf_p1)T_PolyObjWaypoint)
{
SavePolywaypointThinker(save, th, tc_polywaypoint);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_PolyDoorSlide)
else if (th->function == (actionf_p1)T_PolyDoorSlide)
{
SavePolyslidedoorThinker(save, th, tc_polyslidedoor);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_PolyDoorSwing)
else if (th->function == (actionf_p1)T_PolyDoorSwing)
{
SavePolyswingdoorThinker(save, th, tc_polyswingdoor);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_PolyObjFlag)
else if (th->function == (actionf_p1)T_PolyObjFlag)
{
SavePolymoveThinker(save, th, tc_polyflag);
continue;
}
else if (th->function.acp1 == (actionf_p1)T_PolyObjDisplace)
else if (th->function == (actionf_p1)T_PolyObjDisplace)
{
SavePolydisplaceThinker(save, th, tc_polydisplace);
continue;
}
#ifdef PARANOIA
else if (th->function.acp1 != (actionf_p1)P_RemoveThinkerDelayed) // wait garbage collection
I_Error("unknown thinker type %p", th->function.acp1);
else if (th->function != (actionf_p1)P_RemoveThinkerDelayed) // wait garbage collection
I_Error("unknown thinker type %p", th->function);
#endif
}
@@ -1884,7 +1884,7 @@ mobj_t *P_FindNewPosition(UINT32 oldposition)
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
mobj = (mobj_t *)th;
@@ -1983,7 +1983,7 @@ static void LoadMobjThinker(savebuffer_t *save, actionf_p1 thinker)
mobj = AllocMobj();
// declare this as a valid mobj as soon as possible.
mobj->thinker.function.acp1 = thinker;
mobj->thinker.function = thinker;
mobj->z = z;
mobj->floorz = floorz;
@@ -2216,7 +2216,7 @@ static void LoadSpecialLevelThinker(savebuffer_t *save, actionf_p1 thinker, UINT
{
levelspecthink_t *ht = Z_Malloc(sizeof (*ht), PU_LEVSPEC, NULL);
size_t i;
ht->thinker.function.acp1 = thinker;
ht->thinker.function = thinker;
for (i = 0; i < 16; i++)
{
ht->vars[i] = READFIXED(save->p); //var[16]
@@ -2244,7 +2244,7 @@ static void LoadSpecialLevelThinker(savebuffer_t *save, actionf_p1 thinker, UINT
static void LoadCeilingThinker(savebuffer_t *save, actionf_p1 thinker)
{
ceiling_t *ht = Z_Malloc(sizeof (*ht), PU_LEVSPEC, NULL);
ht->thinker.function.acp1 = thinker;
ht->thinker.function = thinker;
ht->type = READUINT8(save->p);
ht->sector = LoadSector(READUINT32(save->p));
ht->bottomheight = READFIXED(save->p);
@@ -2273,7 +2273,7 @@ static void LoadCeilingThinker(savebuffer_t *save, actionf_p1 thinker)
static void LoadFloormoveThinker(savebuffer_t *save, actionf_p1 thinker)
{
floormove_t *ht = Z_Malloc(sizeof (*ht), PU_LEVSPEC, NULL);
ht->thinker.function.acp1 = thinker;
ht->thinker.function = thinker;
ht->type = READUINT8(save->p);
ht->crush = READUINT8(save->p);
ht->sector = LoadSector(READUINT32(save->p));
@@ -2297,7 +2297,7 @@ static void LoadFloormoveThinker(savebuffer_t *save, actionf_p1 thinker)
static void LoadLightflashThinker(savebuffer_t *save, actionf_p1 thinker)
{
lightflash_t *ht = Z_Malloc(sizeof (*ht), PU_LEVSPEC, NULL);
ht->thinker.function.acp1 = thinker;
ht->thinker.function = thinker;
ht->sector = LoadSector(READUINT32(save->p));
ht->maxlight = READINT32(save->p);
ht->minlight = READINT32(save->p);
@@ -2314,7 +2314,7 @@ static void LoadLightflashThinker(savebuffer_t *save, actionf_p1 thinker)
static void LoadStrobeThinker(savebuffer_t *save, actionf_p1 thinker)
{
strobe_t *ht = Z_Malloc(sizeof (*ht), PU_LEVSPEC, NULL);
ht->thinker.function.acp1 = thinker;
ht->thinker.function = thinker;
ht->sector = LoadSector(READUINT32(save->p));
ht->count = READINT32(save->p);
ht->minlight = READINT32(save->p);
@@ -2334,7 +2334,7 @@ static void LoadStrobeThinker(savebuffer_t *save, actionf_p1 thinker)
static void LoadGlowThinker(savebuffer_t *save, actionf_p1 thinker)
{
glow_t *ht = Z_Malloc(sizeof (*ht), PU_LEVSPEC, NULL);
ht->thinker.function.acp1 = thinker;
ht->thinker.function = thinker;
ht->sector = LoadSector(READUINT32(save->p));
ht->minlight = READINT32(save->p);
ht->maxlight = READINT32(save->p);
@@ -2353,7 +2353,7 @@ static void LoadGlowThinker(savebuffer_t *save, actionf_p1 thinker)
static void LoadFireflickerThinker(savebuffer_t *save, actionf_p1 thinker)
{
fireflicker_t *ht = Z_Malloc(sizeof (*ht), PU_LEVSPEC, NULL);
ht->thinker.function.acp1 = thinker;
ht->thinker.function = thinker;
ht->sector = LoadSector(READUINT32(save->p));
ht->count = READINT32(save->p);
ht->resetcount = READINT32(save->p);
@@ -2372,7 +2372,7 @@ static void LoadFireflickerThinker(savebuffer_t *save, actionf_p1 thinker)
static void LoadElevatorThinker(savebuffer_t *save, actionf_p1 thinker, UINT8 floorOrCeiling)
{
elevator_t *ht = Z_Malloc(sizeof (*ht), PU_LEVSPEC, NULL);
ht->thinker.function.acp1 = thinker;
ht->thinker.function = thinker;
ht->type = READUINT8(save->p);
ht->sector = LoadSector(READUINT32(save->p));
ht->actionsector = LoadSector(READUINT32(save->p));
@@ -2410,7 +2410,7 @@ static void LoadElevatorThinker(savebuffer_t *save, actionf_p1 thinker, UINT8 fl
static void LoadScrollThinker(savebuffer_t *save, actionf_p1 thinker)
{
scroll_t *ht = Z_Malloc(sizeof (*ht), PU_LEVSPEC, NULL);
ht->thinker.function.acp1 = thinker;
ht->thinker.function = thinker;
ht->dx = READFIXED(save->p);
ht->dy = READFIXED(save->p);
ht->affectee = READINT32(save->p);
@@ -2432,7 +2432,7 @@ static void LoadScrollThinker(savebuffer_t *save, actionf_p1 thinker)
static inline void LoadFrictionThinker(savebuffer_t *save, actionf_p1 thinker)
{
friction_t *ht = Z_Malloc(sizeof (*ht), PU_LEVSPEC, NULL);
ht->thinker.function.acp1 = thinker;
ht->thinker.function = thinker;
ht->friction = READINT32(save->p);
ht->movefactor = READINT32(save->p);
ht->affectee = READINT32(save->p);
@@ -2449,7 +2449,7 @@ static inline void LoadFrictionThinker(savebuffer_t *save, actionf_p1 thinker)
static void LoadPusherThinker(savebuffer_t *save, actionf_p1 thinker)
{
pusher_t *ht = Z_Malloc(sizeof (*ht), PU_LEVSPEC, NULL);
ht->thinker.function.acp1 = thinker;
ht->thinker.function = thinker;
ht->type = READUINT8(save->p);
ht->x_mag = READINT32(save->p);
ht->y_mag = READINT32(save->p);
@@ -2476,7 +2476,7 @@ static inline void LoadLaserThinker(savebuffer_t *save, actionf_p1 thinker)
{
laserthink_t *ht = Z_Malloc(sizeof (*ht), PU_LEVSPEC, NULL);
ffloor_t *rover = NULL;
ht->thinker.function.acp1 = thinker;
ht->thinker.function = thinker;
ht->sector = LoadSector(READUINT32(save->p));
ht->sec = LoadSector(READUINT32(save->p));
ht->sourceline = LoadLine(READUINT32(save->p));
@@ -2495,7 +2495,7 @@ static inline void LoadLaserThinker(savebuffer_t *save, actionf_p1 thinker)
FUNCINLINE static ATTRINLINE void LoadLightlevelThinker(savebuffer_t *save, actionf_p1 thinker)
{
lightlevel_t *ht = Z_Malloc(sizeof (*ht), PU_LEVSPEC, NULL);
ht->thinker.function.acp1 = thinker;
ht->thinker.function = thinker;
ht->sector = LoadSector(READUINT32(save->p));
ht->destlevel = READINT32(save->p);
ht->speed = READINT32(save->p);
@@ -2512,7 +2512,7 @@ FUNCINLINE static ATTRINLINE void LoadLightlevelThinker(savebuffer_t *save, acti
static inline void LoadExecutorThinker(savebuffer_t *save, actionf_p1 thinker)
{
executor_t *ht = Z_Malloc(sizeof (*ht), PU_LEVSPEC, NULL);
ht->thinker.function.acp1 = thinker;
ht->thinker.function = thinker;
ht->line = LoadLine(READUINT32(save->p));
ht->caller = LoadMobj(READUINT32(save->p));
ht->sector = LoadSector(READUINT32(save->p));
@@ -2528,7 +2528,7 @@ static inline void LoadExecutorThinker(savebuffer_t *save, actionf_p1 thinker)
static inline void LoadDisappearThinker(savebuffer_t *save, actionf_p1 thinker)
{
disappear_t *ht = Z_Malloc(sizeof (*ht), PU_LEVSPEC, NULL);
ht->thinker.function.acp1 = thinker;
ht->thinker.function = thinker;
ht->appeartime = READUINT32(save->p);
ht->disappeartime = READUINT32(save->p);
ht->offset = READUINT32(save->p);
@@ -2547,7 +2547,7 @@ static inline void LoadDisappearThinker(savebuffer_t *save, actionf_p1 thinker)
static inline void LoadPolyrotatetThinker(savebuffer_t *save, actionf_p1 thinker)
{
polyrotate_t *ht = Z_Malloc(sizeof (*ht), PU_LEVSPEC, NULL);
ht->thinker.function.acp1 = thinker;
ht->thinker.function = thinker;
ht->polyObjNum = READINT32(save->p);
ht->speed = READINT32(save->p);
ht->distance = READINT32(save->p);
@@ -2563,7 +2563,7 @@ static inline void LoadPolyrotatetThinker(savebuffer_t *save, actionf_p1 thinker
static void LoadPolymoveThinker(savebuffer_t *save, actionf_p1 thinker)
{
polymove_t *ht = Z_Malloc(sizeof (*ht), PU_LEVSPEC, NULL);
ht->thinker.function.acp1 = thinker;
ht->thinker.function = thinker;
ht->polyObjNum = READINT32(save->p);
ht->speed = READINT32(save->p);
ht->momx = READFIXED(save->p);
@@ -2581,7 +2581,7 @@ static void LoadPolymoveThinker(savebuffer_t *save, actionf_p1 thinker)
static inline void LoadPolywaypointThinker(savebuffer_t *save, actionf_p1 thinker)
{
polywaypoint_t *ht = Z_Malloc(sizeof (*ht), PU_LEVSPEC, NULL);
ht->thinker.function.acp1 = thinker;
ht->thinker.function = thinker;
ht->polyObjNum = READINT32(save->p);
ht->speed = READINT32(save->p);
ht->sequence = READINT32(save->p);
@@ -2605,7 +2605,7 @@ static inline void LoadPolywaypointThinker(savebuffer_t *save, actionf_p1 thinke
static inline void LoadPolyslidedoorThinker(savebuffer_t *save, actionf_p1 thinker)
{
polyslidedoor_t *ht = Z_Malloc(sizeof (*ht), PU_LEVSPEC, NULL);
ht->thinker.function.acp1 = thinker;
ht->thinker.function = thinker;
ht->polyObjNum = READINT32(save->p);
ht->delay = READINT32(save->p);
ht->delayCount = READINT32(save->p);
@@ -2630,7 +2630,7 @@ static inline void LoadPolyslidedoorThinker(savebuffer_t *save, actionf_p1 think
static inline void LoadPolyswingdoorThinker(savebuffer_t *save, actionf_p1 thinker)
{
polyswingdoor_t *ht = Z_Malloc(sizeof (*ht), PU_LEVSPEC, NULL);
ht->thinker.function.acp1 = thinker;
ht->thinker.function = thinker;
ht->polyObjNum = READINT32(save->p);
ht->delay = READINT32(save->p);
ht->delayCount = READINT32(save->p);
@@ -2650,7 +2650,7 @@ static inline void LoadPolyswingdoorThinker(savebuffer_t *save, actionf_p1 think
static inline void LoadPolydisplaceThinker(savebuffer_t *save, actionf_p1 thinker)
{
polydisplace_t *ht = Z_Malloc(sizeof (*ht), PU_LEVSPEC, NULL);
ht->thinker.function.acp1 = thinker;
ht->thinker.function = thinker;
ht->polyObjNum = READINT32(save->p);
ht->controlSector = LoadSector(READUINT32(save->p));
ht->dx = READFIXED(save->p);
@@ -2680,7 +2680,7 @@ static void P_NetUnArchiveThinkers(savebuffer_t *save)
{
next = currentthinker->next;
if (currentthinker->function.acp1 == (actionf_p1)P_MobjThinker)
if (currentthinker->function == (actionf_p1)P_MobjThinker)
P_RemoveSavegameMobj((mobj_t *)currentthinker); // item isn't saved, don't remove it
else
{
@@ -2874,7 +2874,7 @@ static void P_NetUnArchiveThinkers(savebuffer_t *save)
for (currentthinker = thinkercap.next; currentthinker != &thinkercap;
currentthinker = currentthinker->next)
{
if (currentthinker->function.acp1 != (actionf_p1)T_ExecutorDelay)
if (currentthinker->function != (actionf_p1)T_ExecutorDelay)
continue;
delay = (void *)currentthinker;
@@ -2989,7 +2989,7 @@ static inline void P_FinishMobjs(void)
for (currentthinker = thinkercap.next; currentthinker != &thinkercap;
currentthinker = currentthinker->next)
{
if (currentthinker->function.acp1 != (actionf_p1)P_MobjThinker)
if (currentthinker->function != (actionf_p1)P_MobjThinker)
continue;
mobj = (mobj_t *)currentthinker;
@@ -3014,7 +3014,7 @@ static void P_RelinkPointers(void)
for (currentthinker = thinkercap.next; currentthinker != &thinkercap;
currentthinker = currentthinker->next)
{
if (currentthinker->function.acp1 != (actionf_p1)P_MobjThinker)
if (currentthinker->function != (actionf_p1)P_MobjThinker)
continue;
mobj = (mobj_t *)currentthinker;
@@ -3431,7 +3431,7 @@ void P_SaveNetGame(savebuffer_t *save, boolean resending)
{
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
mobj = (mobj_t *)th;
+34 -33
View File
@@ -1302,7 +1302,7 @@ static void P_AddExecutorDelay(line_t *line, mobj_t *mobj, sector_t *sector)
e = Z_Calloc(sizeof (*e), PU_LEVSPEC, NULL);
e->thinker.function.acp1 = (actionf_p1)T_ExecutorDelay;
e->thinker.function = (actionf_p1)T_ExecutorDelay;
e->line = line;
e->sector = sector;
e->timer = (line->backsector->ceilingheight>>FRACBITS)+(line->backsector->floorheight>>FRACBITS);
@@ -2602,7 +2602,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)T_Scroll)
if (th->function != (actionf_p1)T_Scroll)
continue;
scroller = (scroll_t *)th;
@@ -2937,7 +2937,7 @@ void P_SetupSignExit(player_t *player)
// spin all signposts in the level then.
for (think = thinkercap.next; think != &thinkercap; think = think->next)
{
if (think->function.acp1 != (actionf_p1)P_MobjThinker)
if (think->function != (actionf_p1)P_MobjThinker)
continue; // not a mobj thinker
thing = (mobj_t *)think;
@@ -2986,7 +2986,7 @@ boolean P_IsFlagAtBase(mobjtype_t flag)
for (think = thinkercap.next; think != &thinkercap; think = think->next)
{
if (think->function.acp1 != (actionf_p1)P_MobjThinker)
if (think->function != (actionf_p1)P_MobjThinker)
continue; // not a mobj thinker
mo = (mobj_t *)think;
@@ -3419,7 +3419,7 @@ void P_ProcessSpecialSector(player_t *player, sector_t *sector, sector_t *rovers
// The chimps are my friends.. heeheeheheehehee..... - LouisJM
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
mo2 = (mobj_t *)th;
@@ -3760,7 +3760,7 @@ DoneSection2:
// to find the first waypoint
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
mo2 = (mobj_t *)th;
@@ -3833,7 +3833,7 @@ DoneSection2:
// to find the last waypoint
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
mo2 = (mobj_t *)th;
@@ -3889,6 +3889,7 @@ DoneSection2:
{
if (!playeringame[i] || players[i].spectator)
continue;
nump++;
}
@@ -4044,7 +4045,7 @@ DoneSection2:
// to find the first waypoint
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
mo2 = (mobj_t *)th;
@@ -4082,7 +4083,7 @@ DoneSection2:
// Find waypoint before this one (waypointlow)
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
mo2 = (mobj_t *)th;
@@ -4109,7 +4110,7 @@ DoneSection2:
// Find waypoint after this one (waypointhigh)
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
mo2 = (mobj_t *)th;
@@ -4799,7 +4800,7 @@ static ffloor_t *P_AddFakeFloor(sector_t *sec, sector_t *sec2, line_t *master, f
break;
// Should this FOF have spikeness?
if (th->function.acp1 == (actionf_p1)T_SpikeSector)
if (th->function == (actionf_p1)T_SpikeSector)
{
lst = (levelspecthink_t *)th;
@@ -4807,7 +4808,7 @@ static ffloor_t *P_AddFakeFloor(sector_t *sec, sector_t *sec2, line_t *master, f
P_AddSpikeThinker(sec, (INT32)sec2num);
}
// Should this FOF have friction?
else if(th->function.acp1 == (actionf_p1)T_Friction)
else if(th->function == (actionf_p1)T_Friction)
{
f = (friction_t *)th;
@@ -4815,7 +4816,7 @@ static ffloor_t *P_AddFakeFloor(sector_t *sec, sector_t *sec2, line_t *master, f
Add_Friction(f->friction, f->movefactor, (INT32)(sec-sectors), f->affectee);
}
// Should this FOF have wind/current/pusher?
else if(th->function.acp1 == (actionf_p1)T_Pusher)
else if(th->function == (actionf_p1)T_Pusher)
{
p = (pusher_t *)th;
@@ -4906,7 +4907,7 @@ static void P_AddSpikeThinker(sector_t *sec, INT32 referrer)
spikes = Z_Calloc(sizeof (*spikes), PU_LEVSPEC, NULL);
P_AddThinker(&spikes->thinker);
spikes->thinker.function.acp1 = (actionf_p1)T_SpikeSector;
spikes->thinker.function = (actionf_p1)T_SpikeSector;
spikes->sector = sec;
spikes->vars[0] = referrer;
@@ -4928,7 +4929,7 @@ static void P_AddFloatThinker(sector_t *sec, INT32 tag, line_t *sourceline)
floater = Z_Calloc(sizeof (*floater), PU_LEVSPEC, NULL);
P_AddThinker(&floater->thinker);
floater->thinker.function.acp1 = (actionf_p1)T_FloatSector;
floater->thinker.function = (actionf_p1)T_FloatSector;
floater->sector = sec;
floater->vars[0] = tag;
@@ -4957,7 +4958,7 @@ static void P_AddBlockThinker(sector_t *sec, line_t *sourceline)
block = Z_Calloc(sizeof (*block), PU_LEVSPEC, NULL);
P_AddThinker(&block->thinker);
block->thinker.function.acp1 = (actionf_p1)T_MarioBlockChecker;
block->thinker.function = (actionf_p1)T_MarioBlockChecker;
block->sourceline = sourceline;
block->sector = sec;
@@ -4986,7 +4987,7 @@ static void P_AddRaiseThinker(sector_t *sec, line_t *sourceline)
raise = Z_Calloc(sizeof (*raise), PU_LEVSPEC, NULL);
P_AddThinker(&raise->thinker);
raise->thinker.function.acp1 = (actionf_p1)T_RaiseSector;
raise->thinker.function = (actionf_p1)T_RaiseSector;
if (sourceline->flags & ML_BLOCKMONSTERS)
raise->vars[0] = 1;
@@ -5029,7 +5030,7 @@ static void P_AddOldAirbob(sector_t *sec, line_t *sourceline, boolean noadjust)
airbob = Z_Calloc(sizeof (*airbob), PU_LEVSPEC, NULL);
P_AddThinker(&airbob->thinker);
airbob->thinker.function.acp1 = (actionf_p1)T_RaiseSector;
airbob->thinker.function = (actionf_p1)T_RaiseSector;
// set up the fields
airbob->sector = sec;
@@ -5094,7 +5095,7 @@ static inline void P_AddThwompThinker(sector_t *sec, sector_t *actionsector, lin
thwomp = Z_Calloc(sizeof (*thwomp), PU_LEVSPEC, NULL);
P_AddThinker(&thwomp->thinker);
thwomp->thinker.function.acp1 = (actionf_p1)T_ThwompSector;
thwomp->thinker.function = (actionf_p1)T_ThwompSector;
// set up the fields according to the type of elevator action
thwomp->sector = sec;
@@ -5135,7 +5136,7 @@ static inline void P_AddNoEnemiesThinker(sector_t *sec, line_t *sourceline)
nobaddies = Z_Calloc(sizeof (*nobaddies), PU_LEVSPEC, NULL);
P_AddThinker(&nobaddies->thinker);
nobaddies->thinker.function.acp1 = (actionf_p1)T_NoEnemiesSector;
nobaddies->thinker.function = (actionf_p1)T_NoEnemiesSector;
nobaddies->sector = sec;
nobaddies->sourceline = sourceline;
@@ -5157,7 +5158,7 @@ static inline void P_AddEachTimeThinker(sector_t *sec, line_t *sourceline)
eachtime = Z_Calloc(sizeof (*eachtime), PU_LEVSPEC, NULL);
P_AddThinker(&eachtime->thinker);
eachtime->thinker.function.acp1 = (actionf_p1)T_EachTimeThinker;
eachtime->thinker.function = (actionf_p1)T_EachTimeThinker;
eachtime->sector = sec;
eachtime->sourceline = sourceline;
@@ -5179,7 +5180,7 @@ static inline void P_AddCameraScanner(sector_t *sourcesec, sector_t *actionsecto
elevator = Z_Calloc(sizeof (*elevator), PU_LEVSPEC, NULL);
P_AddThinker(&elevator->thinker);
elevator->thinker.function.acp1 = (actionf_p1)T_CameraScanner;
elevator->thinker.function = (actionf_p1)T_CameraScanner;
elevator->type = elevateBounce;
// set up the fields according to the type of elevator action
@@ -5268,7 +5269,7 @@ static inline void EV_AddLaserThinker(sector_t *sec, sector_t *sec2, line_t *lin
P_AddThinker(&flash->thinker);
flash->thinker.function.acp1 = (actionf_p1)T_LaserFlash;
flash->thinker.function = (actionf_p1)T_LaserFlash;
flash->ffloor = ffloor;
flash->sector = sec; // For finding mobjs
flash->sec = sec2;
@@ -5382,11 +5383,11 @@ void P_SpawnSpecials(INT32 fromnetsave, boolean reloadinggamestate)
// Firstly, find out how many there are in each sector
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 == (actionf_p1)T_SpikeSector)
if (th->function == (actionf_p1)T_SpikeSector)
secthinkers[((levelspecthink_t *)th)->sector - sectors].count++;
else if (th->function.acp1 == (actionf_p1)T_Friction)
else if (th->function == (actionf_p1)T_Friction)
secthinkers[((friction_t *)th)->affectee].count++;
else if (th->function.acp1 == (actionf_p1)T_Pusher)
else if (th->function == (actionf_p1)T_Pusher)
secthinkers[((pusher_t *)th)->affectee].count++;
}
@@ -5404,11 +5405,11 @@ void P_SpawnSpecials(INT32 fromnetsave, boolean reloadinggamestate)
{
size_t secnum = (size_t)-1;
if (th->function.acp1 == (actionf_p1)T_SpikeSector)
if (th->function == (actionf_p1)T_SpikeSector)
secnum = ((levelspecthink_t *)th)->sector - sectors;
else if (th->function.acp1 == (actionf_p1)T_Friction)
else if (th->function == (actionf_p1)T_Friction)
secnum = ((friction_t *)th)->affectee;
else if (th->function.acp1 == (actionf_p1)T_Pusher)
else if (th->function == (actionf_p1)T_Pusher)
secnum = ((pusher_t *)th)->affectee;
if (secnum != (size_t)-1)
@@ -6632,7 +6633,7 @@ void T_Scroll(scroll_t *s)
static void Add_Scroller(INT32 type, fixed_t dx, fixed_t dy, INT32 control, INT32 affectee, INT32 accel, INT32 exclusive)
{
scroll_t *s = Z_Calloc(sizeof *s, PU_LEVSPEC, NULL);
s->thinker.function.acp1 = (actionf_p1)T_Scroll;
s->thinker.function = (actionf_p1)T_Scroll;
s->type = type;
s->dx = dx;
s->dy = dy;
@@ -6802,7 +6803,7 @@ static void Add_MasterDisappearer(tic_t appeartime, tic_t disappeartime, tic_t o
{
disappear_t *d = Z_Malloc(sizeof *d, PU_LEVSPEC, NULL);
d->thinker.function.acp1 = (actionf_p1)T_Disappear;
d->thinker.function = (actionf_p1)T_Disappear;
d->appeartime = appeartime;
d->disappeartime = disappeartime;
d->offset = offset;
@@ -6887,7 +6888,7 @@ static void Add_Friction(INT32 friction, INT32 movefactor, INT32 affectee, INT32
{
friction_t *f = Z_Calloc(sizeof *f, PU_LEVSPEC, NULL);
f->thinker.function.acp1 = (actionf_p1)T_Friction;
f->thinker.function = (actionf_p1)T_Friction;
f->friction = friction;
f->movefactor = movefactor;
f->affectee = affectee;
@@ -7042,7 +7043,7 @@ static void Add_Pusher(pushertype_e type, fixed_t x_mag, fixed_t y_mag, mobj_t *
{
pusher_t *p = Z_Calloc(sizeof *p, PU_LEVSPEC, NULL);
p->thinker.function.acp1 = (actionf_p1)T_Pusher;
p->thinker.function = (actionf_p1)T_Pusher;
p->source = source;
p->type = type;
p->x_mag = x_mag>>FRACBITS;
+17 -13
View File
@@ -115,7 +115,7 @@ void Command_Numthinkers_f(void)
for (think = listtype->next; think != listtype; think = think->next)
{
if (think->function.acp1 != action)
if (think->function != action)
continue;
count++;
@@ -152,7 +152,7 @@ void Command_CountMobjs_f(void)
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
if (((mobj_t *)th)->type == i)
@@ -172,7 +172,7 @@ void Command_CountMobjs_f(void)
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
if (((mobj_t *)th)->type == i)
@@ -207,7 +207,7 @@ void P_AddThinker(thinker_t *thinker)
thinker->references = 0; // killough 11/98: init reference counter to 0
thinker->cachable = (thinker->function.acp1 == (actionf_p1)P_MobjThinker);
thinker->cachable = (thinker->function == (actionf_p1)P_MobjThinker);
#ifdef PARANOIA
thinker->debug_mobjtype = MT_NULL;
#endif
@@ -235,7 +235,7 @@ void P_AddPrecipThinker(thinker_t *thinker)
#ifdef PARANOIA
static const char *MobjTypeName(const mobj_t *mobj)
{
actionf_p1 p1 = mobj->thinker.function.acp1;
actionf_p1 p1 = mobj->thinker.function;
if (p1 == (actionf_p1)P_MobjThinker)
{
@@ -254,7 +254,7 @@ static const char *MobjTypeName(const mobj_t *mobj)
static const char *MobjThinkerName(const mobj_t *mobj)
{
actionf_p1 p1 = mobj->thinker.function.acp1;
actionf_p1 p1 = mobj->thinker.function;
if (p1 == (actionf_p1)P_MobjThinker)
{
@@ -371,7 +371,7 @@ void P_UnlinkThinker(thinker_t *thinker)
void P_RemoveThinker(thinker_t *thinker)
{
LUA_InvalidateUserdata(thinker);
thinker->function.acp1 = (actionf_p1)P_RemoveThinkerDelayed;
thinker->function = (actionf_p1)P_RemoveThinkerDelayed;
}
/*
@@ -455,9 +455,9 @@ static inline void P_RunThinkers(void)
for (currentthinker = thinkercap.next; currentthinker != &thinkercap; currentthinker = currentthinker->next)
{
#ifdef PARANOIA
I_Assert(currentthinker->function.acp1 != NULL);
I_Assert(currentthinker->function != NULL);
#endif
currentthinker->function.acp1(currentthinker);
currentthinker->function(currentthinker);
}
}
@@ -610,7 +610,7 @@ static inline void P_ResetSpriteStuff(void)
{
mobj_t *mo;
if (th->function.acp1 != (actionf_p1)P_MobjThinker) // not a mobj
if (th->function != (actionf_p1)P_MobjThinker) // not a mobj
continue;
mo = (mobj_t *)th;
@@ -734,8 +734,10 @@ void P_Ticker(boolean run)
PS_START_TIMING(ps_playerthink_time);
for (i = 0; i < MAXPLAYERS; i++)
if (playeringame[i] && players[i].mo && !P_MobjWasRemoved(players[i].mo))
{
if (playeringame[i] && !P_MobjWasRemoved(players[i].mo))
P_PlayerThink(&players[i]);
}
PS_STOP_TIMING(ps_playerthink_time);
}
@@ -754,8 +756,10 @@ void P_Ticker(boolean run)
// Run any "after all the other thinkers" stuff
for (i = 0; i < MAXPLAYERS; i++)
if (playeringame[i] && players[i].mo && !P_MobjWasRemoved(players[i].mo))
{
if (playeringame[i] && !P_MobjWasRemoved(players[i].mo))
P_PlayerAfterThink(&players[i]);
}
// Apply rumble to local players
if (!demo.playback)
@@ -957,7 +961,7 @@ void P_PreTicker(INT32 frames)
if (!playeringame[i])
continue;
if (!players[i].mo || P_MobjWasRemoved(players[i].mo))
if (P_MobjWasRemoved(players[i].mo))
continue;
P_PlayerAfterThink(&players[i]);
+15 -11
View File
@@ -552,9 +552,13 @@ static UINT8 getPlayerPos(player_t *player)
{
UINT8 pos = 1;
for (int i = 0; i < MAXPLAYERS; ++i) {
if (!playeringame[i] || players[i].spectator) continue;
if (players[i].marescore > player->marescore) ++pos;
for (UINT8 i = 0; i < MAXPLAYERS; ++i)
{
if (!playeringame[i] || players[i].spectator)
continue;
if (players[i].marescore > player->marescore)
++pos;
}
return pos;
@@ -1064,7 +1068,7 @@ void P_SpawnShieldOrb(player_t *player)
// blaze through the thinkers to see if an orb already exists!
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
shieldobj = (mobj_t *)th;
@@ -1780,7 +1784,7 @@ void P_Telekinesis(player_t *player, fixed_t thrust, fixed_t range)
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
mo2 = (mobj_t *)th;
@@ -2506,7 +2510,7 @@ static void P_DoZoomTube(player_t *player)
// Find next waypoint
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker) // Not a mobj thinker
if (th->function != (actionf_p1)P_MobjThinker) // Not a mobj thinker
continue;
mo2 = (mobj_t *)th;
@@ -2596,7 +2600,7 @@ void P_NukeEnemies(mobj_t *inflictor, mobj_t *source, fixed_t radius)
for (think = thinkercap.next; think != &thinkercap; think = think->next)
{
if (think->function.acp1 != (actionf_p1)P_MobjThinker)
if (think->function != (actionf_p1)P_MobjThinker)
continue; // not a mobj thinker
mo = (mobj_t *)think;
@@ -2673,7 +2677,7 @@ boolean P_LookForEnemies(player_t *player)
for (think = thinkercap.next; think != &thinkercap; think = think->next)
{
if (think->function.acp1 != (actionf_p1)P_MobjThinker)
if (think->function != (actionf_p1)P_MobjThinker)
continue; // not a mobj thinker
mo = (mobj_t *)think;
@@ -2797,7 +2801,7 @@ void P_FindEmerald(void)
// to find all emeralds
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
mo2 = (mobj_t *)th;
@@ -4245,7 +4249,7 @@ static void P_CalcPostImg(player_t *player, camera_t *thiscam)
else
pviewheight = player->mo->z + player->viewheight;
if (player->awayviewtics && player->awayviewmobj && !P_MobjWasRemoved(player->awayviewmobj))
if (player->awayviewtics && !P_MobjWasRemoved(player->awayviewmobj))
{
sector = player->awayviewmobj->subsector->sector;
pviewheight = player->awayviewmobj->z + 20*FRACUNIT;
@@ -4776,7 +4780,7 @@ void P_PlayerThink(player_t *player)
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
mo2 = (mobj_t *)th;
+1 -1
View File
@@ -1865,7 +1865,7 @@ static void R_PrecacheLevelSprites(void)
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
if (th->function != (actionf_p1)P_MobjThinker)
continue;
spritepresent[((mobj_t *)th)->sprite] = 1;
+5 -5
View File
@@ -80,7 +80,7 @@ write netcode into the sound code, OKAY?
#define GME_BASS 1.0f
#endif // HAVE_GME
//static UINT16 BUFFERSIZE = 2048;
static UINT16 SAMPLERATE = 44100;
@@ -710,7 +710,7 @@ static void mix_gme(void *udata, Uint8 *stream, int len)
// play gme into stream
gme_play(gme, len/2, (short *)stream);
// Limiter to prevent music from being disorted with some formats
if (music_volume >= 18)
music_volume = 18;
@@ -726,7 +726,7 @@ static void mix_openmpt(void *udata, Uint8 *stream, int len)
{
int i;
short *p;
(void)udata;
if (!openmpt_mhandle || songpaused)
@@ -734,7 +734,7 @@ static void mix_openmpt(void *udata, Uint8 *stream, int len)
// Play module into stream
openmpt_module_read_interleaved_stereo(openmpt_mhandle, SAMPLERATE, cv_audbuffersize.value, (short *)stream);
// Limiter to prevent music from being disorted with some formats
if (music_volume >= 18)
music_volume = 18;
@@ -823,7 +823,7 @@ boolean I_SetSongSpeed(float speed)
#endif
#ifdef HAVE_OPENMPT
if (openmpt_mhandle)
{
{
if (speed > 4.0f)
speed = 4.0f; // Limit this to 4x to prevent crashing, stupid fix but... ~SteelT 27/9/19
#if OPENMPT_API_VERSION_MAJOR < 1 && OPENMPT_API_VERSION_MINOR < 5