Un-shitify function.acp1 pointers
This commit is contained in:
parent
abdf530730
commit
a8609d7204
39 changed files with 658 additions and 452 deletions
|
|
@ -660,7 +660,7 @@ bool CallFunc_ThingCount(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::
|
|||
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5363,7 +5363,7 @@ static INT16 Consistancy(void)
|
|||
{
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
mo = (mobj_t *)th;
|
||||
|
|
|
|||
|
|
@ -6462,7 +6462,7 @@ static void Command_Archivetest_f(void)
|
|||
// assign mobjnum
|
||||
i = 1;
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
if (th->function.acp1 != (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function != (actionf_p1)P_RemoveThinkerDelayed)
|
||||
((mobj_t *)th)->mobjnum = i++;
|
||||
|
||||
// allocate buffer
|
||||
|
|
|
|||
|
|
@ -28,18 +28,11 @@ extern "C" {
|
|||
// 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.
|
||||
struct thinker_t
|
||||
|
|
|
|||
|
|
@ -75,14 +75,14 @@ static inline int lib_freeslot(lua_State *L)
|
|||
// Arguments: mobj_t actor, int var1, int var2
|
||||
static int action_call(lua_State *L)
|
||||
{
|
||||
//actionf_t *action = lua_touserdata(L,lua_upvalueindex(1));
|
||||
actionf_t *action = *((actionf_t **)luaL_checkudata(L, 1, META_ACTION));
|
||||
//actionf_p1 *action = lua_touserdata(L,lua_upvalueindex(1));
|
||||
actionf_p1 *action = *((actionf_p1 **)luaL_checkudata(L, 1, META_ACTION));
|
||||
mobj_t *actor = *((mobj_t **)luaL_checkudata(L, 2, META_MOBJ));
|
||||
var1 = (INT32)luaL_optinteger(L, 3, 0);
|
||||
var2 = (INT32)luaL_optinteger(L, 4, 0);
|
||||
if (!actor)
|
||||
return LUA_ErrInvalid(L, "mobj_t");
|
||||
action->acp1(actor);
|
||||
(*action)(actor);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -520,7 +520,7 @@ static inline int lib_getenum(lua_State *L)
|
|||
// Retrieving them from this metatable allows them to be case-insensitive!
|
||||
for (i = 0; actionpointers[i].name; i++)
|
||||
if (fasticmp(word, actionpointers[i].name)) {
|
||||
// We push the actionf_t* itself as userdata!
|
||||
// We push the actionf_p1* itself as userdata!
|
||||
LUA_PushUserdata(L, &actionpointers[i].action, META_ACTION);
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -589,7 +589,7 @@ static int lib_getActionName(lua_State *L)
|
|||
{
|
||||
if (lua_isuserdata(L, 1)) // arg 1 is built-in action, expect action userdata
|
||||
{
|
||||
actionf_t *action = *((actionf_t **)luaL_checkudata(L, 1, META_ACTION));
|
||||
actionf_p1 *action = *((actionf_p1 **)luaL_checkudata(L, 1, META_ACTION));
|
||||
const char *name = NULL;
|
||||
if (!action)
|
||||
return luaL_error(L, "not a valid action?");
|
||||
|
|
@ -651,11 +651,11 @@ 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;
|
||||
|
|
@ -670,8 +670,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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2453,25 +2453,25 @@ 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;
|
||||
}
|
||||
|
||||
z = 0;
|
||||
found = LUA_SetLuaAction(&states[num], actiontocompare);
|
||||
if (!found)
|
||||
{
|
||||
while (actionpointers[z].name)
|
||||
{
|
||||
if (fastcmp(actiontocompare, 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;
|
||||
}
|
||||
z++;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found)
|
||||
deh_warning("Unknown action %s", actiontocompare);
|
||||
|
|
|
|||
|
|
@ -141,14 +141,14 @@ struct flickytypes_s FLICKYTYPES[] = {
|
|||
|
||||
actionpointer_t actionpointers[] =
|
||||
{
|
||||
#define _(name, upper, ...) {{name}, "A_"#upper},
|
||||
#define _(name, upper, ...) {name, "A_"#upper},
|
||||
#include "info/actions.h"
|
||||
#undef _
|
||||
|
||||
{{NULL}, "NONE"},
|
||||
{NULL, "NONE"},
|
||||
|
||||
// This NULL entry must be the last in the list
|
||||
{{NULL}, NULL},
|
||||
{NULL, NULL},
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
#define __DEH_TABLES_H__
|
||||
|
||||
#include "doomdef.h" // Constants
|
||||
#include "d_think.h" // actionf_t
|
||||
#include "d_think.h" // actionf_p1
|
||||
#include "info.h" // Mobj, state, sprite, etc constants
|
||||
#include "lua_script.h"
|
||||
#include "strbuf.h"
|
||||
|
|
@ -53,7 +53,7 @@ struct flickytypes_s {
|
|||
*/
|
||||
struct actionpointer_t
|
||||
{
|
||||
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.
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1619,7 +1619,7 @@ void F_TitleScreenTicker(boolean run)
|
|||
{
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
mo2 = (mobj_t *)th;
|
||||
|
|
|
|||
|
|
@ -1866,7 +1866,7 @@ void G_ConsGhostTic(INT32 playernum)
|
|||
thinker_t *th = NULL;
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
mobj = (mobj_t *)th;
|
||||
if (mobj->type == damage->type && mobj->x == damage->x && mobj->y == damage->y && mobj->z == damage->z)
|
||||
|
|
@ -4140,7 +4140,7 @@ void G_DoPlayMetal(void)
|
|||
// find metal sonic
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
mo = (mobj_t *)th;
|
||||
|
|
|
|||
|
|
@ -3439,7 +3439,7 @@ void G_ChangePlayerReferences(mobj_t *oldmo, mobj_t *newmo)
|
|||
// scan all thinkers
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
mo2 = (mobj_t *)th;
|
||||
|
|
|
|||
|
|
@ -918,7 +918,7 @@ static void HWR_PrecacheLevelSprites(void)
|
|||
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
|
||||
if (th->function != (actionf_p1)P_MobjThinker)
|
||||
continue;
|
||||
|
||||
mo = (mobj_t *)th;
|
||||
|
|
|
|||
|
|
@ -1412,7 +1412,7 @@ static void HWR_SearchLightsInMobjs(void)
|
|||
|
||||
// search in the list of thinkers
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
if (th->function.acp1 != (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function != (actionf_p1)P_RemoveThinkerDelayed)
|
||||
HWR_AddMobjLights((mobj_t *)th);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ enum actionnum {
|
|||
};
|
||||
|
||||
// function prototypes for actions
|
||||
#define _(name, upper, ...) void name(mobj_t *actor);
|
||||
#define _(name, upper, ...) void name(void *thing);
|
||||
#include "info/actions.h"
|
||||
#undef _
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ struct state_t
|
|||
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;
|
||||
|
|
|
|||
|
|
@ -374,7 +374,7 @@ void K_RunPaperItemSpawners(void)
|
|||
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
mo = (mobj_t *)th;
|
||||
|
|
@ -537,7 +537,7 @@ void K_RespawnBattleBoxes(void)
|
|||
mobj_t *box;
|
||||
mobj_t *newmobj;
|
||||
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
box = (mobj_t *)th;
|
||||
|
|
|
|||
|
|
@ -11201,7 +11201,7 @@ boolean K_IsSPBInGame(void)
|
|||
// spbplace is still -1 until a fired SPB finds a target, so look for an in-map SPB just in case
|
||||
for (think = thlist[THINK_MOBJ].next; think != &thlist[THINK_MOBJ]; think = think->next)
|
||||
{
|
||||
if (think->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (think->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
if (((mobj_t *)think)->type == MT_SPB)
|
||||
|
|
|
|||
|
|
@ -3056,7 +3056,7 @@ void K_AdjustWaypointsParameters (void)
|
|||
th != &thlist[THINK_MOBJ];
|
||||
th = th->next
|
||||
){
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
anchor = (const mobj_t *)th;
|
||||
|
|
|
|||
|
|
@ -780,21 +780,19 @@ 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));
|
||||
break;
|
||||
case LUA_TUSERDATA: // It's a userdata, expect META_ACTION of a built-in action
|
||||
{
|
||||
actionf_t *action = *((actionf_t **)luaL_checkudata(L, 3, META_ACTION));
|
||||
actionf_p1 *action = *((actionf_p1 **)luaL_checkudata(L, 3, META_ACTION));
|
||||
|
||||
if (!action)
|
||||
return luaL_error(L, "not a valid action?");
|
||||
|
||||
state->action = *action;
|
||||
state->action.acv = action->acv;
|
||||
state->action.acp1 = action->acp1;
|
||||
break;
|
||||
}
|
||||
case LUA_TFUNCTION: // It's a function (a Lua function or a C function? either way!)
|
||||
|
|
@ -804,7 +802,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");
|
||||
|
|
@ -862,7 +860,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.
|
||||
}
|
||||
|
||||
|
|
@ -929,9 +927,9 @@ static int state_get(lua_State *L)
|
|||
number = st->tics;
|
||||
else if (fastcmp(field,"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
|
||||
|
|
@ -948,9 +946,9 @@ static int state_get(lua_State *L)
|
|||
return 1; // return just the function
|
||||
#ifdef DEVELOP
|
||||
} else if (fastcmp(field,"actionname")) {
|
||||
if (!st->action.acp1) { // Action is NULL.
|
||||
if (!st->action) { // Action is NULL.
|
||||
lua_pushstring(L, "NULL");
|
||||
} else if (st->action.acp1 == (actionf_p1)A_Lua) { // This is a Lua function?
|
||||
} else if (st->action == (actionf_p1)A_Lua) { // This is a Lua function?
|
||||
lua_Debug ar;
|
||||
lua_getfield(L, LUA_REGISTRYINDEX, LREG_STATEACTION);
|
||||
I_Assert(lua_istable(L, -1));
|
||||
|
|
@ -1019,21 +1017,19 @@ 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));
|
||||
break;
|
||||
case LUA_TUSERDATA: // It's a userdata, expect META_ACTION of a built-in action
|
||||
{
|
||||
actionf_t *action = *((actionf_t **)luaL_checkudata(L, 3, META_ACTION));
|
||||
actionf_p1 *action = *((actionf_p1 **)luaL_checkudata(L, 3, META_ACTION));
|
||||
|
||||
if (!action)
|
||||
return luaL_error(L, "not a valid action?");
|
||||
|
||||
st->action = *action;
|
||||
st->action.acv = action->acv;
|
||||
st->action.acp1 = action->acp1;
|
||||
break;
|
||||
}
|
||||
case LUA_TFUNCTION: // It's a function (a Lua function or a C function? either way!)
|
||||
|
|
@ -1043,7 +1039,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");
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ extern lua_State *gL;
|
|||
#define META_COLORMAP "COLORMAP"
|
||||
#define META_CAMERA "CAMERA_T*"
|
||||
|
||||
#define META_ACTION "ACTIONF_T*"
|
||||
#define META_ACTION "actionf_p1*"
|
||||
|
||||
#define META_LUABANKS "LUABANKS[]*"
|
||||
|
||||
|
|
|
|||
|
|
@ -1944,7 +1944,7 @@ void LUA_Sync(savebuffer_t *save, boolean network, boolean compat)
|
|||
{
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
// archive function will determine when to skip mobjs,
|
||||
|
|
@ -1968,7 +1968,7 @@ void LUA_Sync(savebuffer_t *save, boolean network, boolean compat)
|
|||
mobjnum = READUINT32(save->p); // read a mobjnum
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
if (((mobj_t *)th)->mobjnum != mobjnum) // find matching mobj
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -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)); \
|
||||
|
|
@ -93,7 +93,7 @@ static int lib_iterateThinkers(lua_State *L)
|
|||
return luaL_error(L, "next thinker invalidated during iteration");
|
||||
|
||||
for (; next != &thlist[THINK_MOBJ]; next = next->next)
|
||||
if (!it->filter || next->function.acp1 == it->filter)
|
||||
if (!it->filter || next->function == it->filter)
|
||||
{
|
||||
push_thinker(next);
|
||||
if (next->next != &thlist[THINK_MOBJ])
|
||||
|
|
|
|||
|
|
@ -440,7 +440,7 @@ void Command_ATeleport_f(void)
|
|||
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
mo2 = (mobj_t *)th;
|
||||
|
|
@ -948,7 +948,7 @@ static mapthing_t *OP_CreateNewMapThing(player_t *player, UINT16 type, boolean c
|
|||
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
mo = (mobj_t *)th;
|
||||
|
|
|
|||
|
|
@ -438,7 +438,7 @@ static void M_DrawTickStats(void)
|
|||
for (thinker = thlist[i].next; thinker != &thlist[i]; thinker = thinker->next)
|
||||
{
|
||||
thinkercount++;
|
||||
if (thinker->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (thinker->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
removecount++;
|
||||
else if (i == THINK_POLYOBJ)
|
||||
polythcount++;
|
||||
|
|
@ -446,7 +446,7 @@ static void M_DrawTickStats(void)
|
|||
mainthcount++;
|
||||
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;
|
||||
mobjcount++;
|
||||
|
|
|
|||
|
|
@ -323,7 +323,7 @@ INT32 EV_DoCeilingOLD(mtag_t tag, line_t *line, ceiling_e type)
|
|||
ceiling = Z_Calloc(sizeof (*ceiling), PU_LEVSPEC, NULL);
|
||||
P_AddThinker(THINK_MAIN, &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);
|
||||
|
|
@ -465,7 +465,7 @@ static ceiling_t *CreateCeilingThinker(sector_t *sec)
|
|||
|
||||
sec->ceilingdata = ceiling;
|
||||
|
||||
ceiling->thinker.function.acp1 = (actionf_p1)T_MoveCeiling;
|
||||
ceiling->thinker.function = (actionf_p1)T_MoveCeiling;
|
||||
ceiling->sector = sec;
|
||||
ceiling->crush = false;
|
||||
|
||||
|
|
@ -799,7 +799,7 @@ INT32 EV_DoCrushOLD(mtag_t tag, line_t *line, ceiling_e type)
|
|||
ceiling = Z_Calloc(sizeof (*ceiling), PU_LEVSPEC, NULL);
|
||||
P_AddThinker(THINK_MAIN, &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);
|
||||
|
|
@ -853,7 +853,7 @@ static ceiling_t *CreateCrushThinker(sector_t *sec)
|
|||
|
||||
sec->ceilingdata = ceiling;
|
||||
|
||||
ceiling->thinker.function.acp1 = (actionf_p1)T_MoveCeiling;
|
||||
ceiling->thinker.function = (actionf_p1)T_MoveCeiling;
|
||||
ceiling->sector = sec;
|
||||
ceiling->crush = true;
|
||||
|
||||
|
|
|
|||
705
src/p_enemy.c
705
src/p_enemy.c
File diff suppressed because it is too large
Load diff
|
|
@ -1688,7 +1688,7 @@ void EV_DoFloorOLD(mtag_t tag, 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;
|
||||
|
|
@ -1809,7 +1809,7 @@ static floormove_t *CreateFloorThinker(sector_t *sec)
|
|||
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->sector = sec;
|
||||
dofloor->crush = false; // default: types that crush will change this
|
||||
|
||||
|
|
@ -2103,7 +2103,7 @@ static elevator_t *CreateElevatorThinker(sector_t *sec)
|
|||
sec->ceilingdata = elevator;
|
||||
|
||||
// set up some generic aspects of the floormove_t
|
||||
elevator->thinker.function.acp1 = (actionf_p1)T_MoveElevator;
|
||||
elevator->thinker.function = (actionf_p1)T_MoveElevator;
|
||||
elevator->distance = 1; // Always crush unless otherwise
|
||||
elevator->sector = sec;
|
||||
|
||||
|
|
@ -2397,7 +2397,7 @@ void EV_BounceSector(sector_t *sec, fixed_t momz, line_t *sourceline)
|
|||
bouncer = Z_Calloc(sizeof (*bouncer), PU_LEVSPEC, NULL);
|
||||
P_AddThinker(THINK_MAIN, &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->sourceline = sourceline;
|
||||
|
|
@ -2423,7 +2423,7 @@ void EV_DoContinuousFall(sector_t *sec, sector_t *backsector, fixed_t spd, boole
|
|||
// create and initialize new thinker
|
||||
faller = Z_Calloc(sizeof (*faller), PU_LEVSPEC, NULL);
|
||||
P_AddThinker(THINK_MAIN, &faller->thinker);
|
||||
faller->thinker.function.acp1 = (actionf_p1)T_ContinuousFalling;
|
||||
faller->thinker.function = (actionf_p1)T_ContinuousFalling;
|
||||
|
||||
// set up the fields
|
||||
faller->sector = sec;
|
||||
|
|
@ -2459,7 +2459,7 @@ INT32 EV_StartCrumble(sector_t *sec, ffloor_t *rover, boolean floating,
|
|||
// create and initialize new crumble thinker
|
||||
crumble = Z_Calloc(sizeof (*crumble), PU_LEVSPEC, NULL);
|
||||
P_AddThinker(THINK_MAIN, &crumble->thinker);
|
||||
crumble->thinker.function.acp1 = (actionf_p1)T_StartCrumble;
|
||||
crumble->thinker.function = (actionf_p1)T_StartCrumble;
|
||||
|
||||
// set up the fields
|
||||
crumble->sector = sec;
|
||||
|
|
@ -2535,7 +2535,7 @@ void EV_MarioBlock(ffloor_t *rover, sector_t *sector, mobj_t *puncher)
|
|||
P_AddThinker(THINK_MAIN, &block->thinker);
|
||||
roversec->floordata = block;
|
||||
roversec->ceilingdata = block;
|
||||
block->thinker.function.acp1 = (actionf_p1)T_MarioBlock;
|
||||
block->thinker.function = (actionf_p1)T_MarioBlock;
|
||||
|
||||
// Set up the fields
|
||||
block->sector = roversec;
|
||||
|
|
|
|||
|
|
@ -1509,7 +1509,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
|||
// scan the thinkers to make sure all the old pinch dummies are gone on death
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
mo = (mobj_t *)th;
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ fireflicker_t *P_SpawnAdjustableFireFlicker(sector_t *sector, INT16 lighta, INT1
|
|||
|
||||
P_AddThinker(THINK_MAIN, &flick->thinker);
|
||||
|
||||
flick->thinker.function.acp1 = (actionf_p1)T_FireFlicker;
|
||||
flick->thinker.function = (actionf_p1)T_FireFlicker;
|
||||
flick->sector = sector;
|
||||
flick->maxlight = max(lighta, lightb);
|
||||
flick->minlight = min(lighta, lightb);
|
||||
|
|
@ -136,7 +136,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
|
||||
|
|
@ -153,7 +153,7 @@ void P_SpawnLightningFlash(sector_t *sector)
|
|||
|
||||
P_AddThinker(THINK_MAIN, &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;
|
||||
|
|
@ -215,7 +215,7 @@ strobe_t *P_SpawnAdjustableStrobeFlash(sector_t *sector, INT16 lighta, INT16 lig
|
|||
flash->sector = sector;
|
||||
flash->darktime = darktime;
|
||||
flash->brighttime = brighttime;
|
||||
flash->thinker.function.acp1 = (actionf_p1)T_StrobeFlash;
|
||||
flash->thinker.function = (actionf_p1)T_StrobeFlash;
|
||||
flash->maxlight = max(lighta, lightb);
|
||||
flash->minlight = min(lighta, lightb);
|
||||
|
||||
|
|
@ -285,7 +285,7 @@ glow_t *P_SpawnAdjustableGlowingLight(sector_t *sector, INT16 lighta, INT16 ligh
|
|||
g->sector = sector;
|
||||
g->minlight = min(lighta, lightb);
|
||||
g->maxlight = max(lighta, lightb);
|
||||
g->thinker.function.acp1 = (actionf_p1)T_Glow;
|
||||
g->thinker.function = (actionf_p1)T_Glow;
|
||||
g->direction = 1;
|
||||
g->speed = (INT16)(length/4);
|
||||
if (g->speed > (g->maxlight - g->minlight)/2) // don't make it ridiculous speed
|
||||
|
|
@ -333,7 +333,7 @@ void P_FadeLightBySector(sector_t *sector, INT32 destvalue, INT32 speed, boolean
|
|||
}
|
||||
|
||||
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(THINK_MAIN, &ll->thinker); // add thinker
|
||||
|
|
@ -368,7 +368,7 @@ void P_FadeLight(INT16 tag, INT32 destvalue, INT32 speed, boolean ticbased, bool
|
|||
{
|
||||
if (!force && ticbased // always let speed fader execute
|
||||
&& sectors[i].lightingdata
|
||||
&& ((lightlevel_t*)sectors[i].lightingdata)->thinker.function.acp1 == (actionf_p1)T_LightFade)
|
||||
&& ((lightlevel_t*)sectors[i].lightingdata)->thinker.function == (actionf_p1)T_LightFade)
|
||||
// && ((lightlevel_t*)sectors[i].lightingdata)->timer > 2)
|
||||
{
|
||||
CONS_Debug(DBG_GAMELOGIC, "Line type 420 Executor: Fade light thinker already exists, timer: %d\n", ((lightlevel_t*)sectors[i].lightingdata)->timer);
|
||||
|
|
|
|||
|
|
@ -335,7 +335,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 == NULL || mobj->thinker.function.acp1 != (actionf_p1)P_MobjThinker;
|
||||
return mobj == NULL || mobj->thinker.function != (actionf_p1)P_MobjThinker;
|
||||
}
|
||||
|
||||
fixed_t P_MobjFloorZ(const mobj_t *mobj, const sector_t *sector, const sector_t *boundsec, fixed_t x, fixed_t y, const line_t *line, boolean lowest, boolean perfect);
|
||||
|
|
|
|||
|
|
@ -3819,7 +3819,7 @@ static boolean PIT_ChangeSector(mobj_t *thing, boolean realcrush)
|
|||
|
||||
for (think = thlist[THINK_MAIN].next; think != &thlist[THINK_MAIN]; think = think->next)
|
||||
{
|
||||
if (think->function.acp1 != (actionf_p1)T_StartCrumble)
|
||||
if (think->function != (actionf_p1)T_StartCrumble)
|
||||
continue;
|
||||
|
||||
crumbler = (crumble_t *)think;
|
||||
|
|
|
|||
48
src/p_mobj.c
48
src/p_mobj.c
|
|
@ -96,7 +96,7 @@ 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);
|
||||
states[ac->statenum].action(ac->mobj);
|
||||
next = ac->next;
|
||||
Z_Free(ac);
|
||||
}
|
||||
|
|
@ -116,7 +116,7 @@ void P_AddCachedAction(mobj_t *mobj, INT32 statenum)
|
|||
static inline INT32 randomframe (mobj_t *mobj, INT32 n)
|
||||
{
|
||||
// Only mobj thinkers should use synced RNG
|
||||
if (mobj->thinker.function.acp1 == (actionf_p1)P_MobjThinker)
|
||||
if (mobj->thinker.function == (actionf_p1)P_MobjThinker)
|
||||
return P_RandomKey(n);
|
||||
else
|
||||
return M_RandomKey(n);
|
||||
|
|
@ -387,12 +387,12 @@ 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...
|
||||
|
|
@ -511,12 +511,12 @@ 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;
|
||||
}
|
||||
|
|
@ -3658,7 +3658,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;
|
||||
|
|
@ -4612,7 +4612,7 @@ static void P_Boss3Thinker(mobj_t *mobj)
|
|||
// this can happen if the boss was hurt earlier than expected
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
mo2 = (mobj_t *)th;
|
||||
|
|
@ -4703,7 +4703,7 @@ static void P_Boss3Thinker(mobj_t *mobj)
|
|||
// the number
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
mo2 = (mobj_t *)th;
|
||||
|
|
@ -5330,7 +5330,7 @@ static void P_Boss7Thinker(mobj_t *mobj)
|
|||
// Find waypoint he is closest to
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
mo2 = (mobj_t *)th;
|
||||
|
|
@ -5385,7 +5385,7 @@ static void P_Boss7Thinker(mobj_t *mobj)
|
|||
// the waypoint to use
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
mo2 = (mobj_t *)th;
|
||||
|
|
@ -5510,7 +5510,7 @@ static void P_Boss9Thinker(mobj_t *mobj)
|
|||
// Build a hoop linked list of 'em!
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
mo2 = (mobj_t *)th;
|
||||
|
|
@ -5965,7 +5965,7 @@ mobj_t *P_GetClosestAxis(mobj_t *source)
|
|||
// scan the thinkers to find the closest axis point
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
mo2 = (mobj_t *)th;
|
||||
|
|
@ -10302,13 +10302,13 @@ static void P_FiringThink(mobj_t *mobj)
|
|||
if (mobj->health <= 0)
|
||||
return;
|
||||
|
||||
if (mobj->state->action.acp1 == (actionf_p1)A_Boss1Laser)
|
||||
if (mobj->state->action == (actionf_p1)A_Boss1Laser)
|
||||
{
|
||||
if (mobj->state->tics > 1)
|
||||
{
|
||||
var1 = mobj->state->var1;
|
||||
var2 = mobj->state->var2 & 65535;
|
||||
mobj->state->action.acp1(mobj);
|
||||
mobj->state->action(mobj);
|
||||
}
|
||||
}
|
||||
else if (leveltime & 1) // Fire mode
|
||||
|
|
@ -11151,7 +11151,7 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
|
|||
mobj = P_AllocateMobj();
|
||||
|
||||
// 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;
|
||||
|
||||
|
|
@ -11310,7 +11310,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;
|
||||
|
|
@ -11635,7 +11635,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 == true)
|
||||
{
|
||||
|
|
@ -11650,7 +11650,7 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
|
|||
var1 = st->var1;
|
||||
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))
|
||||
|
|
@ -11709,7 +11709,7 @@ static precipmobj_t *P_SpawnPrecipMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype
|
|||
|
||||
start_z = mobj->floorz;
|
||||
|
||||
mobj->thinker.function.acp1 = (actionf_p1)P_NullPrecipThinker;
|
||||
mobj->thinker.function = (actionf_p1)P_NullPrecipThinker;
|
||||
P_AddThinker(THINK_PRECIP, &mobj->thinker);
|
||||
|
||||
P_CalculatePrecipFloor(mobj);
|
||||
|
|
@ -11768,9 +11768,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 (mobj->spawnpoint &&
|
||||
|
|
@ -11928,7 +11928,7 @@ void P_FreePrecipMobj(precipmobj_t *mobj)
|
|||
// Clearing out stuff for savegames
|
||||
void P_RemoveSavegameMobj(mobj_t *mobj)
|
||||
{
|
||||
if (((thinker_t *)mobj)->function.acp1 == (actionf_p1)P_NullPrecipThinker)
|
||||
if (((thinker_t *)mobj)->function == (actionf_p1)P_NullPrecipThinker)
|
||||
{
|
||||
// unlink from sector and block lists
|
||||
P_UnsetPrecipThingPosition((precipmobj_t *)mobj);
|
||||
|
|
@ -13340,7 +13340,7 @@ static boolean P_MapAlreadyHasStarPost(mobj_t *mobj)
|
|||
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
mo2 = (mobj_t *)th;
|
||||
|
|
|
|||
|
|
@ -1314,7 +1314,7 @@ void Polyobj_InitLevel(void)
|
|||
// the mobj_t pointers on a queue for use below.
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
mo = (mobj_t *)th;
|
||||
|
|
@ -2030,7 +2030,7 @@ boolean 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;
|
||||
P_AddThinker(THINK_POLYOBJ, &th->thinker);
|
||||
po->thinker = &th->thinker;
|
||||
|
||||
|
|
@ -2102,7 +2102,7 @@ boolean 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;
|
||||
P_AddThinker(THINK_POLYOBJ, &th->thinker);
|
||||
po->thinker = &th->thinker;
|
||||
|
||||
|
|
@ -2164,7 +2164,7 @@ boolean 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;
|
||||
P_AddThinker(THINK_POLYOBJ, &th->thinker);
|
||||
po->thinker = &th->thinker;
|
||||
|
||||
|
|
@ -2231,7 +2231,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;
|
||||
P_AddThinker(THINK_POLYOBJ, &th->thinker);
|
||||
|
||||
// point the polyobject to this thinker
|
||||
|
|
@ -2282,7 +2282,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;
|
||||
P_AddThinker(THINK_POLYOBJ, &th->thinker);
|
||||
|
||||
// point the polyobject to this thinker
|
||||
|
|
@ -2367,7 +2367,7 @@ boolean 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;
|
||||
P_AddThinker(THINK_POLYOBJ, &th->thinker);
|
||||
po->thinker = &th->thinker;
|
||||
|
||||
|
|
@ -2416,7 +2416,7 @@ boolean EV_DoPolyObjRotDisplace(polyrotdisplacedata_t *prdata)
|
|||
|
||||
// create a new thinker
|
||||
th = Z_Malloc(sizeof(polyrotdisplace_t), PU_LEVSPEC, NULL);
|
||||
th->thinker.function.acp1 = (actionf_p1)T_PolyObjRotDisplace;
|
||||
th->thinker.function = (actionf_p1)T_PolyObjRotDisplace;
|
||||
P_AddThinker(THINK_POLYOBJ, &th->thinker);
|
||||
po->thinker = &th->thinker;
|
||||
|
||||
|
|
@ -2521,7 +2521,7 @@ boolean EV_DoPolyObjFlag(polyflagdata_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;
|
||||
P_AddThinker(THINK_POLYOBJ, &th->thinker);
|
||||
po->thinker = &th->thinker;
|
||||
|
||||
|
|
@ -2669,12 +2669,12 @@ boolean EV_DoPolyObjFade(polyfadedata_t *pfdata)
|
|||
if (po->translucency == pfdata->destvalue)
|
||||
return true;
|
||||
|
||||
if (po->thinker && po->thinker->function.acp1 == (actionf_p1)T_PolyObjFade)
|
||||
if (po->thinker && po->thinker->function == (actionf_p1)T_PolyObjFade)
|
||||
P_RemoveThinker(po->thinker);
|
||||
|
||||
// create a new thinker
|
||||
th = Z_Malloc(sizeof(polyfade_t), PU_LEVSPEC, NULL);
|
||||
th->thinker.function.acp1 = (actionf_p1)T_PolyObjFade;
|
||||
th->thinker.function = (actionf_p1)T_PolyObjFade;
|
||||
P_AddThinker(THINK_POLYOBJ, &th->thinker);
|
||||
po->thinker = &th->thinker;
|
||||
|
||||
|
|
|
|||
|
|
@ -2082,7 +2082,7 @@ static thinker_t *SyncMobjThinker(savebuffer_t *save, actionf_p1 thinker, thinke
|
|||
mobj = P_AllocateMobj();
|
||||
|
||||
// declare this as a valid mobj as soon as possible.
|
||||
mobj->thinker.function.acp1 = thinker;
|
||||
mobj->thinker.function = thinker;
|
||||
|
||||
// manually link to thinkerlist, since the thinker isn't returned anymore
|
||||
if (!save->write)
|
||||
|
|
@ -2381,7 +2381,7 @@ static thinker_t *SyncNoEnemiesThinker(savebuffer_t *save, actionf_p1 thinker, t
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
SYNC(ht->sourceline);
|
||||
return &ht->thinker;
|
||||
|
|
@ -2397,7 +2397,7 @@ static thinker_t *SyncBounceCheeseThinker(savebuffer_t *save, actionf_p1 thinker
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->sourceline);
|
||||
|
|
@ -2422,7 +2422,7 @@ static thinker_t *SyncContinuousFallThinker(savebuffer_t *save, actionf_p1 think
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->sector);
|
||||
|
|
@ -2449,7 +2449,7 @@ static thinker_t *SyncMarioBlockThinker(savebuffer_t *save, actionf_p1 thinker,
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->sector);
|
||||
|
|
@ -2476,7 +2476,7 @@ static thinker_t *SyncMarioCheckThinker(savebuffer_t *save, actionf_p1 thinker,
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->sourceline);
|
||||
|
|
@ -2494,7 +2494,7 @@ static thinker_t *SyncThwompThinker(savebuffer_t *save, actionf_p1 thinker, thin
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->sourceline);
|
||||
|
|
@ -2526,7 +2526,7 @@ static thinker_t *SyncFloatThinker(savebuffer_t *save, actionf_p1 thinker, think
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->sourceline);
|
||||
|
|
@ -2545,7 +2545,7 @@ static thinker_t *SyncEachTimeThinker(savebuffer_t *save, actionf_p1 thinker, th
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
size_t i;
|
||||
|
|
@ -2568,7 +2568,7 @@ static thinker_t *SyncRaiseThinker(savebuffer_t *save, actionf_p1 thinker, think
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->tag);
|
||||
|
|
@ -2592,7 +2592,7 @@ static thinker_t *SyncCeilingThinker(savebuffer_t *save, actionf_p1 thinker, thi
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->type);
|
||||
|
|
@ -2628,7 +2628,7 @@ static thinker_t *SyncFloormoveThinker(savebuffer_t *save, actionf_p1 thinker, t
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->type);
|
||||
|
|
@ -2660,7 +2660,7 @@ static thinker_t *SyncLightflashThinker(savebuffer_t *save, actionf_p1 thinker,
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
SYNC(ht->sector);
|
||||
SYNC(ht->maxlight);
|
||||
|
|
@ -2680,7 +2680,7 @@ static thinker_t *SyncStrobeThinker(savebuffer_t *save, actionf_p1 thinker, thin
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->sector);
|
||||
|
|
@ -2704,7 +2704,7 @@ static thinker_t *SyncGlowThinker(savebuffer_t *save, actionf_p1 thinker, thinke
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->sector);
|
||||
|
|
@ -2727,7 +2727,7 @@ static thinker_t *SyncFireflickerThinker(savebuffer_t *save, actionf_p1 thinker,
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->sector);
|
||||
|
|
@ -2751,7 +2751,7 @@ static thinker_t *SyncElevatorThinker(savebuffer_t *save, actionf_p1 thinker, th
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->type);
|
||||
|
|
@ -2788,7 +2788,7 @@ static thinker_t *SyncCrumbleThinker(savebuffer_t *save, actionf_p1 thinker, thi
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->sourceline);
|
||||
|
|
@ -2819,7 +2819,7 @@ static thinker_t *SyncScrollThinker(savebuffer_t *save, actionf_p1 thinker, thin
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->dx);
|
||||
|
|
@ -2845,7 +2845,7 @@ static thinker_t *SyncFrictionThinker(savebuffer_t *save, actionf_p1 thinker, th
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->friction);
|
||||
|
|
@ -2866,7 +2866,7 @@ static thinker_t *SyncPusherThinker(savebuffer_t *save, actionf_p1 thinker, thin
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->type);
|
||||
|
|
@ -2891,7 +2891,7 @@ static thinker_t *SyncLaserThinker(savebuffer_t *save, actionf_p1 thinker, think
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->tag);
|
||||
|
|
@ -2910,7 +2910,7 @@ static thinker_t *SyncLightlevelThinker(savebuffer_t *save, actionf_p1 thinker,
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->sector);
|
||||
|
|
@ -2934,7 +2934,7 @@ static thinker_t *SyncExecutorThinker(savebuffer_t *save, actionf_p1 thinker, th
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->line);
|
||||
|
|
@ -2954,7 +2954,7 @@ static thinker_t *SyncDisappearThinker(savebuffer_t *save, actionf_p1 thinker, t
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->appeartime);
|
||||
|
|
@ -2977,7 +2977,7 @@ static thinker_t *SyncFadeThinker(savebuffer_t *save, actionf_p1 thinker, thinke
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
ht->dest_exc = GetNetColormapFromList(P_SyncUINT32(save, CheckAddNetColormapToList(ht->dest_exc)));
|
||||
|
|
@ -3030,7 +3030,7 @@ static thinker_t *SyncFadeColormapThinker(savebuffer_t *save, actionf_p1 thinker
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->sector);
|
||||
|
|
@ -3054,7 +3054,7 @@ static thinker_t *SyncPlaneDisplaceThinker(savebuffer_t *save, actionf_p1 thinke
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->affectee);
|
||||
|
|
@ -3075,7 +3075,7 @@ static thinker_t *SyncDynamicLineSlopeThinker(savebuffer_t *save, actionf_p1 thi
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->type);
|
||||
|
|
@ -3096,7 +3096,7 @@ static thinker_t *SyncDynamicVertexSlopeThinker(savebuffer_t *save, actionf_p1 t
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->slope);
|
||||
|
|
@ -3119,7 +3119,7 @@ static thinker_t *SyncPolyrotatetThinker(savebuffer_t *save, actionf_p1 thinker,
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->polyObjNum);
|
||||
|
|
@ -3139,7 +3139,7 @@ static thinker_t *SyncPolymoveThinker(savebuffer_t *save, actionf_p1 thinker, th
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->polyObjNum);
|
||||
|
|
@ -3161,7 +3161,7 @@ static thinker_t *SyncPolywaypointThinker(savebuffer_t *save, actionf_p1 thinker
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->polyObjNum);
|
||||
|
|
@ -3185,7 +3185,7 @@ static thinker_t *SyncPolyslidedoorThinker(savebuffer_t *save, actionf_p1 thinke
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->polyObjNum);
|
||||
|
|
@ -3214,7 +3214,7 @@ static thinker_t *SyncPolyswingdoorThinker(savebuffer_t *save, actionf_p1 thinke
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->polyObjNum);
|
||||
|
|
@ -3238,7 +3238,7 @@ static thinker_t *SyncPolydisplaceThinker(savebuffer_t *save, actionf_p1 thinker
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->polyObjNum);
|
||||
|
|
@ -3259,7 +3259,7 @@ static thinker_t *SyncPolyrotdisplaceThinker(savebuffer_t *save, actionf_p1 thin
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->polyObjNum);
|
||||
|
|
@ -3280,7 +3280,7 @@ static thinker_t *SyncPolyfadeThinker(savebuffer_t *save, actionf_p1 thinker, th
|
|||
else
|
||||
{
|
||||
ht = Z_Calloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
ht->thinker.function = thinker;
|
||||
}
|
||||
|
||||
SYNC(ht->polyObjNum);
|
||||
|
|
@ -3381,7 +3381,7 @@ static void P_NetSyncThinkers(savebuffer_t *save)
|
|||
|
||||
currentthinker->references = 0; // Heinous but this is the only place the assertion in P_UnlinkThinkers is wrong
|
||||
|
||||
if (currentthinker->function.acp1 == (actionf_p1)P_MobjThinker || currentthinker->function.acp1 == (actionf_p1)P_NullPrecipThinker)
|
||||
if (currentthinker->function == (actionf_p1)P_MobjThinker || currentthinker->function == (actionf_p1)P_NullPrecipThinker)
|
||||
P_RemoveSavegameMobj((mobj_t *)currentthinker); // item isn't saved, don't remove it
|
||||
else
|
||||
{
|
||||
|
|
@ -3425,7 +3425,7 @@ static void P_NetSyncThinkers(savebuffer_t *save)
|
|||
break;
|
||||
}
|
||||
|
||||
acp = th->function.acp1;
|
||||
acp = th->function;
|
||||
if (acp == (actionf_p1)P_NullPrecipThinker || acp == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
}
|
||||
|
|
@ -3472,7 +3472,7 @@ static void P_NetSyncThinkers(savebuffer_t *save)
|
|||
executor_t *delay;
|
||||
for (currentthinker = thlist[THINK_MAIN].next; currentthinker != &thlist[THINK_MAIN]; currentthinker = currentthinker->next)
|
||||
{
|
||||
if (currentthinker->function.acp1 != (actionf_p1)T_ExecutorDelay)
|
||||
if (currentthinker->function != (actionf_p1)T_ExecutorDelay)
|
||||
continue;
|
||||
delay = (executor_t *)currentthinker;
|
||||
RELINK(&delay->caller);
|
||||
|
|
@ -3537,7 +3537,7 @@ mobj_t *P_FindNewPosition(UINT32 oldposition)
|
|||
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
mobj = (mobj_t *)th;
|
||||
|
|
@ -3635,7 +3635,7 @@ static void P_RelinkPointers(savebuffer_t *save)
|
|||
for (currentthinker = thlist[THINK_MOBJ].next; currentthinker != &thlist[THINK_MOBJ];
|
||||
currentthinker = currentthinker->next)
|
||||
{
|
||||
if (currentthinker->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (currentthinker->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
mobj = (mobj_t *)currentthinker;
|
||||
|
|
@ -4341,7 +4341,7 @@ void P_SaveNetGame(savebuffer_t *save, boolean resending)
|
|||
{
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
mobj = (mobj_t *)th;
|
||||
|
|
|
|||
|
|
@ -665,7 +665,7 @@ void P_ReloadRings(void)
|
|||
// scan the thinkers to find rings/spheres/hoops to unset
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
mo = (mobj_t *)th;
|
||||
|
|
@ -8185,7 +8185,7 @@ void P_RespawnThings(void)
|
|||
|
||||
for (think = thlist[THINK_MOBJ].next; think != &thlist[THINK_MOBJ]; think = think->next)
|
||||
{
|
||||
if (think->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (think->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
P_RemoveMobj((mobj_t *)think);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ void T_DynamicSlopeVert (dynvertexplanethink_t* th)
|
|||
static inline void P_AddDynLineSlopeThinker (pslope_t* slope, dynplanetype_t type, line_t* sourceline, fixed_t extent)
|
||||
{
|
||||
dynlineplanethink_t* th = Z_Calloc(sizeof (*th), PU_LEVSPEC, NULL);
|
||||
th->thinker.function.acp1 = (actionf_p1)T_DynamicSlopeLine;
|
||||
th->thinker.function = (actionf_p1)T_DynamicSlopeLine;
|
||||
th->slope = slope;
|
||||
th->type = type;
|
||||
th->sourceline = sourceline;
|
||||
|
|
@ -321,7 +321,7 @@ static inline void P_AddDynVertexSlopeThinker (pslope_t* slope, const INT16 tags
|
|||
dynvertexplanethink_t* th = Z_Calloc(sizeof (*th), PU_LEVSPEC, NULL);
|
||||
size_t i;
|
||||
INT32 l;
|
||||
th->thinker.function.acp1 = (actionf_p1)T_DynamicSlopeVert;
|
||||
th->thinker.function = (actionf_p1)T_DynamicSlopeVert;
|
||||
th->slope = slope;
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
|
|
|
|||
60
src/p_spec.c
60
src/p_spec.c
|
|
@ -1025,7 +1025,7 @@ static boolean PolyFade(INT32 *args)
|
|||
// Prevent continuous execs from interfering on an existing fade
|
||||
if (!(args[3] & TMPF_OVERRIDE)
|
||||
&& po->thinker
|
||||
&& po->thinker->function.acp1 == (actionf_p1)T_PolyObjFade)
|
||||
&& po->thinker->function == (actionf_p1)T_PolyObjFade)
|
||||
{
|
||||
CONS_Debug(DBG_POLYOBJ, "Line type 492 Executor: Fade PolyObject thinker already exists\n");
|
||||
return 0;
|
||||
|
|
@ -1240,7 +1240,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 = delay;
|
||||
|
|
@ -1827,7 +1827,7 @@ void P_SwitchWeather(preciptype_t newWeather)
|
|||
{
|
||||
next = think->next;
|
||||
|
||||
if (think->function.acp1 != (actionf_p1)P_NullPrecipThinker)
|
||||
if (think->function != (actionf_p1)P_NullPrecipThinker)
|
||||
continue; // not a precipmobj thinker
|
||||
|
||||
precipmobj = (precipmobj_t *)think;
|
||||
|
|
@ -1843,7 +1843,7 @@ void P_SwitchWeather(preciptype_t newWeather)
|
|||
|
||||
for (think = thlist[THINK_PRECIP].next; think != &thlist[THINK_PRECIP]; think = think->next)
|
||||
{
|
||||
if (think->function.acp1 != (actionf_p1)P_NullPrecipThinker)
|
||||
if (think->function != (actionf_p1)P_NullPrecipThinker)
|
||||
continue; // not a precipmobj thinker
|
||||
|
||||
precipmobj = (precipmobj_t *)think;
|
||||
|
|
@ -3266,7 +3266,7 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha
|
|||
|
||||
for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 != (actionf_p1)T_Scroll)
|
||||
if (th->function != (actionf_p1)T_Scroll)
|
||||
continue;
|
||||
|
||||
scroller = (scroll_t *)th;
|
||||
|
|
@ -4223,7 +4223,7 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha
|
|||
if (mo2->type != MT_EGGTRAP)
|
||||
continue;
|
||||
|
||||
if (mo2->thinker.function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (mo2->thinker.function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
P_KillMobj(mo2, NULL, mo, DMG_NORMAL);
|
||||
|
|
@ -4582,7 +4582,7 @@ void P_SetupSignExit(player_t *player)
|
|||
// spin all signposts in the level then.
|
||||
for (think = thlist[THINK_MOBJ].next; think != &thlist[THINK_MOBJ]; think = think->next)
|
||||
{
|
||||
if (think->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (think->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
thing = (mobj_t *)think;
|
||||
|
|
@ -5070,7 +5070,7 @@ static void P_ProcessEggCapsule(player_t *player, sector_t *sector)
|
|||
// The chimps are my friends.. heeheeheheehehee..... - LouisJM
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
mo2 = (mobj_t *)th;
|
||||
if (mo2->type != MT_EGGTRAP)
|
||||
|
|
@ -6327,7 +6327,7 @@ static ffloor_t *P_AddFakeFloor(sector_t *sec, sector_t *sec2, line_t *master, I
|
|||
break;
|
||||
|
||||
// Should this FOF have friction?
|
||||
if(th->function.acp1 == (actionf_p1)T_Friction)
|
||||
if(th->function == (actionf_p1)T_Friction)
|
||||
{
|
||||
f = (friction_t *)th;
|
||||
|
||||
|
|
@ -6335,7 +6335,7 @@ static ffloor_t *P_AddFakeFloor(sector_t *sec, sector_t *sec2, line_t *master, I
|
|||
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;
|
||||
|
||||
|
|
@ -6470,7 +6470,7 @@ static void P_AddFloatThinker(sector_t *sec, UINT16 tag, line_t *sourceline)
|
|||
floater = Z_Calloc(sizeof (*floater), PU_LEVSPEC, NULL);
|
||||
P_AddThinker(THINK_MAIN, &floater->thinker);
|
||||
|
||||
floater->thinker.function.acp1 = (actionf_p1)T_FloatSector;
|
||||
floater->thinker.function = (actionf_p1)T_FloatSector;
|
||||
|
||||
floater->sector = sec;
|
||||
floater->tag = (INT16)tag;
|
||||
|
|
@ -6501,7 +6501,7 @@ static void P_AddPlaneDisplaceThinker(INT32 type, fixed_t speed, INT32 control,
|
|||
displace = Z_Calloc(sizeof (*displace), PU_LEVSPEC, NULL);
|
||||
P_AddThinker(THINK_MAIN, &displace->thinker);
|
||||
|
||||
displace->thinker.function.acp1 = (actionf_p1)T_PlaneDisplace;
|
||||
displace->thinker.function = (actionf_p1)T_PlaneDisplace;
|
||||
displace->affectee = affectee;
|
||||
displace->control = control;
|
||||
displace->last_height = sectors[control].floorheight;
|
||||
|
|
@ -6531,7 +6531,7 @@ static void P_AddBlockThinker(sector_t *sec, line_t *sourceline)
|
|||
block = Z_Calloc(sizeof (*block), PU_LEVSPEC, NULL);
|
||||
P_AddThinker(THINK_MAIN, &block->thinker);
|
||||
|
||||
block->thinker.function.acp1 = (actionf_p1)T_MarioBlockChecker;
|
||||
block->thinker.function = (actionf_p1)T_MarioBlockChecker;
|
||||
block->sourceline = sourceline;
|
||||
|
||||
block->sector = sec;
|
||||
|
|
@ -6556,7 +6556,7 @@ static void P_AddRaiseThinker(sector_t *sec, INT16 tag, fixed_t speed, fixed_t c
|
|||
raise = Z_Calloc(sizeof (*raise), PU_LEVSPEC, NULL);
|
||||
P_AddThinker(THINK_MAIN, &raise->thinker);
|
||||
|
||||
raise->thinker.function.acp1 = (actionf_p1)T_RaiseSector;
|
||||
raise->thinker.function = (actionf_p1)T_RaiseSector;
|
||||
|
||||
raise->tag = tag;
|
||||
raise->sector = sec;
|
||||
|
|
@ -6582,7 +6582,7 @@ static void P_AddAirbob(sector_t *sec, INT16 tag, fixed_t dist, boolean raise, b
|
|||
airbob = Z_Calloc(sizeof (*airbob), PU_LEVSPEC, NULL);
|
||||
P_AddThinker(THINK_MAIN, &airbob->thinker);
|
||||
|
||||
airbob->thinker.function.acp1 = (actionf_p1)T_RaiseSector;
|
||||
airbob->thinker.function = (actionf_p1)T_RaiseSector;
|
||||
|
||||
airbob->tag = tag;
|
||||
airbob->sector = sec;
|
||||
|
|
@ -6622,7 +6622,7 @@ static inline void P_AddThwompThinker(sector_t *sec, line_t *sourceline, fixed_t
|
|||
thwomp = Z_Calloc(sizeof (*thwomp), PU_LEVSPEC, NULL);
|
||||
P_AddThinker(THINK_MAIN, &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->sourceline = sourceline;
|
||||
|
|
@ -6662,7 +6662,7 @@ static inline void P_AddNoEnemiesThinker(line_t *sourceline)
|
|||
nobaddies = Z_Calloc(sizeof (*nobaddies), PU_LEVSPEC, NULL);
|
||||
P_AddThinker(THINK_MAIN, &nobaddies->thinker);
|
||||
|
||||
nobaddies->thinker.function.acp1 = (actionf_p1)T_NoEnemiesSector;
|
||||
nobaddies->thinker.function = (actionf_p1)T_NoEnemiesSector;
|
||||
|
||||
nobaddies->sourceline = sourceline;
|
||||
}
|
||||
|
|
@ -6682,7 +6682,7 @@ static void P_AddEachTimeThinker(line_t *sourceline, boolean triggerOnExit)
|
|||
eachtime = Z_Calloc(sizeof (*eachtime), PU_LEVSPEC, NULL);
|
||||
P_AddThinker(THINK_MAIN, &eachtime->thinker);
|
||||
|
||||
eachtime->thinker.function.acp1 = (actionf_p1)T_EachTimeThinker;
|
||||
eachtime->thinker.function = (actionf_p1)T_EachTimeThinker;
|
||||
|
||||
eachtime->sourceline = sourceline;
|
||||
eachtime->triggerOnExit = triggerOnExit;
|
||||
|
|
@ -6706,7 +6706,7 @@ static inline void P_AddCameraScanner(sector_t *sourcesec, sector_t *actionsecto
|
|||
elevator = Z_Calloc(sizeof (*elevator), PU_LEVSPEC, NULL);
|
||||
P_AddThinker(THINK_MAIN, &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
|
||||
|
|
@ -6790,7 +6790,7 @@ static inline void P_AddLaserThinker(INT16 tag, line_t *line, boolean nobosses)
|
|||
|
||||
P_AddThinker(THINK_MAIN, &flash->thinker);
|
||||
|
||||
flash->thinker.function.acp1 = (actionf_p1)T_LaserFlash;
|
||||
flash->thinker.function = (actionf_p1)T_LaserFlash;
|
||||
flash->tag = tag;
|
||||
flash->sourceline = line;
|
||||
flash->nobosses = nobosses;
|
||||
|
|
@ -7020,9 +7020,9 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
// Firstly, find out how many there are in each sector
|
||||
for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)T_Friction)
|
||||
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++;
|
||||
}
|
||||
|
||||
|
|
@ -7040,9 +7040,9 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
{
|
||||
size_t secnum = (size_t)-1;
|
||||
|
||||
if (th->function.acp1 == (actionf_p1)T_Friction)
|
||||
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)
|
||||
|
|
@ -8347,7 +8347,7 @@ static boolean IsSector3DBlock(sector_t* sec)
|
|||
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;
|
||||
|
|
@ -8503,7 +8503,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;
|
||||
|
|
@ -8898,7 +8898,7 @@ static void P_AddFakeFloorFader(ffloor_t *rover, size_t sectornum, size_t ffloor
|
|||
|
||||
d = Z_Malloc(sizeof *d, PU_LEVSPEC, NULL);
|
||||
|
||||
d->thinker.function.acp1 = (actionf_p1)T_Fade;
|
||||
d->thinker.function = (actionf_p1)T_Fade;
|
||||
d->rover = rover;
|
||||
d->sectornum = (UINT32)sectornum;
|
||||
d->ffloornum = (UINT32)ffloornum;
|
||||
|
|
@ -9050,7 +9050,7 @@ static void Add_ColormapFader(sector_t *sector, extracolormap_t *source_exc, ext
|
|||
}
|
||||
|
||||
d = Z_Malloc(sizeof *d, PU_LEVSPEC, NULL);
|
||||
d->thinker.function.acp1 = (actionf_p1)T_FadeColormap;
|
||||
d->thinker.function = (actionf_p1)T_FadeColormap;
|
||||
d->sector = sector;
|
||||
d->source_exc = source_exc;
|
||||
d->dest_exc = dest_exc;
|
||||
|
|
@ -9174,7 +9174,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;
|
||||
|
|
@ -9331,7 +9331,7 @@ static void Add_Pusher(pushertype_e type, fixed_t x_mag, fixed_t y_mag, fixed_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->type = type;
|
||||
p->x_mag = x_mag;
|
||||
p->y_mag = y_mag;
|
||||
|
|
|
|||
16
src/p_tick.c
16
src/p_tick.c
|
|
@ -132,7 +132,7 @@ void Command_Numthinkers_f(void)
|
|||
{
|
||||
for (think = thlist[i].next; think != &thlist[i]; think = think->next)
|
||||
{
|
||||
if (think->function.acp1 != action)
|
||||
if (think->function != action)
|
||||
continue;
|
||||
|
||||
count++;
|
||||
|
|
@ -170,7 +170,7 @@ void Command_CountMobjs_f(void)
|
|||
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
if (((mobj_t *)th)->type == i)
|
||||
|
|
@ -190,7 +190,7 @@ void Command_CountMobjs_f(void)
|
|||
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
if (((mobj_t *)th)->type == i)
|
||||
|
|
@ -262,7 +262,7 @@ void P_AddThinker(const thinklistnum_t n, 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)
|
||||
{
|
||||
|
|
@ -281,7 +281,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)
|
||||
{
|
||||
|
|
@ -397,7 +397,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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -486,9 +486,9 @@ static void P_RunThinkers(void)
|
|||
for (currentthinker = thlist[i].next; currentthinker != &thlist[i]; currentthinker = currentthinker->next)
|
||||
{
|
||||
#ifdef PARANOIA
|
||||
I_Assert(currentthinker->function.acp1 != NULL);
|
||||
I_Assert(currentthinker->function != NULL);
|
||||
#endif
|
||||
currentthinker->function.acp1(currentthinker);
|
||||
currentthinker->function(currentthinker);
|
||||
}
|
||||
ps_thlist_times[i] = I_GetPreciseTime() - ps_thlist_times[i];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2465,7 +2465,7 @@ void P_NukeEnemies(mobj_t *inflictor, mobj_t *source, fixed_t radius)
|
|||
|
||||
for (think = thlist[THINK_MOBJ].next; think != &thlist[THINK_MOBJ]; think = think->next)
|
||||
{
|
||||
if (think->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (think->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
mo = (mobj_t *)think;
|
||||
|
|
@ -3620,7 +3620,7 @@ static mobj_t *P_GetAxis(INT32 num)
|
|||
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
if (th->function == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
mobj = (mobj_t *)th;
|
||||
|
|
|
|||
|
|
@ -1326,7 +1326,7 @@ static void R_PrecacheLevelSprites(void)
|
|||
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; 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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue