Subversion Repositories eduke32

Compare Revisions

Ignore whitespace Rev 5038 → Rev 5039

/polymer/eduke32/source/gamedef.c
99,6 → 99,7
{ CON_UNDEFINELEVEL, 20150208 },
{ CON_IFCUTSCENE, 20150210 },
{ CON_DEFINEVOLUMEFLAGS, 20150222 },
{ CON_RESETPLAYERFLAGS, 20150303 },
};
#endif
 
561,6 → 562,7
"startcutscene", // 378
"ifcutscene", // 379
"definevolumeflags", // 380
"resetplayerflags", // 381
"<null>"
};
#endif
4183,6 → 4185,7
case CON_SETPLAYERANGLE:
case CON_SETMUSICPOSITION:
case CON_STARTCUTSCENE:
case CON_RESETPLAYERFLAGS:
C_GetNextVar();
continue;
 
/polymer/eduke32/source/gamedef.h
986,6 → 986,7
CON_STARTCUTSCENE, // 378
CON_IFCUTSCENE, // 379
CON_DEFINEVOLUMEFLAGS, // 380
CON_RESETPLAYERFLAGS, // 381
CON_END
};
// KEEPINSYNC with the keyword list in lunatic/con_lang.lua
/polymer/eduke32/source/gameexec.c
1034,12 → 1034,12
g_sp->zvel = 0;
}
 
static int32_t VM_ResetPlayer(int32_t g_p, int32_t g_flags)
static int32_t VM_ResetPlayer(int32_t g_p, int32_t g_flags, int32_t flags)
{
//AddLog("resetplayer");
if (!g_netServer && ud.multimode < 2)
{
if (g_lastSaveSlot >= 0 && ud.recstat != 2)
if (g_lastSaveSlot >= 0 && ud.recstat != 2 && !(flags & 1))
{
M_OpenMenu(g_p);
KB_ClearKeyDown(sc_Space);
3362,12 → 3362,15
continue;
 
case CON_RESETPLAYER:
{
insptr++;
vm.g_flags = VM_ResetPlayer(vm.g_p, vm.g_flags);
}
continue;
vm.g_flags = VM_ResetPlayer(vm.g_p, vm.g_flags, 0);
continue;
 
case CON_RESETPLAYERFLAGS:
insptr++;
vm.g_flags = VM_ResetPlayer(vm.g_p, vm.g_flags, Gv_GetVarX(*insptr++));
continue;
 
case CON_IFONWATER:
VM_CONDITIONAL(sector[vm.g_sp->sectnum].lotag == ST_1_ABOVE_WATER && klabs(vm.g_sp->z-sector[vm.g_sp->sectnum].floorz) < (32<<8));
continue;
5708,9 → 5711,9
VM_Fall(i, &sprite[i]);
}
 
int32_t VM_ResetPlayer2(int32_t snum)
int32_t VM_ResetPlayer2(int32_t snum, int32_t flags)
{
return VM_ResetPlayer(snum, 0);
return VM_ResetPlayer(snum, 0, flags);
}
 
int32_t VM_CheckSquished2(int32_t i, int32_t snum)
/polymer/eduke32/source/gameexec.h
104,7 → 104,7
int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t unbiasedp);
void P_AddWeaponMaybeSwitchI(int32_t snum, int32_t weap);
void VM_FallSprite(int32_t i);
int32_t VM_ResetPlayer2(int32_t snum);
int32_t VM_ResetPlayer2(int32_t snum, int32_t flags);
int32_t VM_CheckSquished2(int32_t i, int32_t snum);
#endif
 
/polymer/eduke32/source/lunatic/con_lang.lua
1028,6 → 1028,7
"return" +
"respawnhitag" +
"resizearray" +
"resetplayerflags" +
"resetplayer" +
"resetcount" +
"resetactioncount" +
/polymer/eduke32/source/lunatic/control.lua
1187,9 → 1187,9
end
end
 
function _VM_ResetPlayer2(snum)
function _VM_ResetPlayer2(snum, flags)
check_player_idx(snum)
return (CF.VM_ResetPlayer2(snum)~=0)
return (CF.VM_ResetPlayer2(snum, flags)~=0)
end
 
local PALBITS = { [0]=1, [21]=2, [23]=4 }
/polymer/eduke32/source/lunatic/lunacon.lua
2710,7 → 2710,9
resetcount = cmd()
/ ACS":set_count(0)",
resetplayer = cmd() -- NLCF
/ "if (_con._VM_ResetPlayer2(_pli,_aci)) then _con.longjmp() end",
/ "if (_con._VM_ResetPlayer2(_pli,0)) then _con.longjmp() end",
resetplayerflags = cmd(R) -- NLCF
/ "if (_con._VM_ResetPlayer2(_pli,%1)) then _con.longjmp() end",
respawnhitag = cmd()
/ format("_con._respawnhitag(%s)", SPS""),
tip = cmd()
/polymer/eduke32/source/lunatic/lunatic_game.c
359,7 → 359,7
extern int32_t A_ShootWithZvel(int32_t i, int32_t atwith, int32_t override_zvel);
extern int32_t A_Spawn(int32_t j, int32_t pn);
extern void VM_FallSprite(int32_t i);
extern int32_t VM_ResetPlayer2(int32_t snum);
extern int32_t VM_ResetPlayer2(int32_t snum, int32_t flags);
extern void A_RadiusDamage(int32_t i, int32_t r, int32_t, int32_t, int32_t, int32_t);
extern void G_OperateSectors(int32_t sn, int32_t ii);
extern void G_OperateActivators(int32_t low,int32_t snum);
410,7 → 410,7
DEFINE_RET_CFUNC(A_ShootWithZvel, THREE_ARGS)
DEFINE_RET_CFUNC(A_Spawn, TWO_ARGS)
DEFINE_VOID_CFUNC(VM_FallSprite, ONE_ARG)
DEFINE_RET_CFUNC(VM_ResetPlayer2, ONE_ARG)
DEFINE_RET_CFUNC(VM_ResetPlayer2, TWO_ARGS)
DEFINE_VOID_CFUNC(A_RadiusDamage, LARG(1), LARG(2), LARG(3), LARG(4), LARG(5), LARG(6))
DEFINE_VOID_CFUNC(G_OperateSectors, TWO_ARGS)
DEFINE_VOID_CFUNC(G_OperateActivators, TWO_ARGS)