2008-09-03 04:20:46 +00:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
/*
|
|
|
|
Copyright (C) 1996, 2003 - 3D Realms Entertainment
|
|
|
|
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
|
|
|
|
Copyright (C) 2004, 2007 - EDuke32 developers
|
|
|
|
|
|
|
|
This file is part of EDuke32
|
|
|
|
|
|
|
|
EDuke32 is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License version 2
|
|
|
|
as published by the Free Software Foundation.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
|
|
|
See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
//-------------------------------------------------------------------------
|
2008-12-13 08:02:22 +00:00
|
|
|
/*
|
2008-09-03 04:20:46 +00:00
|
|
|
#include "duke3d.h"
|
|
|
|
#include "gamedef.h"
|
|
|
|
#include "osd.h"
|
2008-12-13 08:02:22 +00:00
|
|
|
*/
|
2008-09-03 04:20:46 +00:00
|
|
|
// this is all the crap for accessing the game's structs through the CON VM
|
2008-12-13 21:01:33 +00:00
|
|
|
// I got a 3-4 fps gain by inlining these...
|
2008-09-03 04:20:46 +00:00
|
|
|
|
2009-01-07 14:05:13 +00:00
|
|
|
#ifndef _gamevars_c_
|
2008-12-13 08:02:22 +00:00
|
|
|
static inline void X_AccessUserdef(int iSet, int lLabelID, int lVar2)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
int lValue=0;
|
|
|
|
|
2009-01-07 14:05:13 +00:00
|
|
|
if (vm.g_p != myconnectindex)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
|
|
|
// if (lVar2 == MAXGAMEVARS)
|
|
|
|
// insptr++;
|
|
|
|
insptr += (lVar2 == MAXGAMEVARS);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2008-12-13 08:02:22 +00:00
|
|
|
if (iSet)
|
2009-01-07 14:05:13 +00:00
|
|
|
lValue=Gv_GetVar(lVar2, vm.g_i, vm.g_p);
|
2008-12-13 08:02:22 +00:00
|
|
|
|
2008-09-03 04:20:46 +00:00
|
|
|
switch (lLabelID)
|
|
|
|
{
|
|
|
|
case USERDEFS_GOD:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.god = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.god, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_WARP_ON:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.warp_on = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.warp_on, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_CASHMAN:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.cashman = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.cashman, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_EOG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.eog = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.eog, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_SHOWALLMAP:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.showallmap = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.showallmap, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_SHOW_HELP:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.show_help = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.show_help, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_SCROLLMODE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.scrollmode = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.scrollmode, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_CLIPPING:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.clipping = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.clipping, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
// case USERDEFS_USER_NAME:
|
|
|
|
// if(iSet)
|
|
|
|
// {
|
2008-12-13 08:02:22 +00:00
|
|
|
// ud.user_name[MAXPLAYERS][32] = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
// return;
|
|
|
|
// }
|
2009-01-07 14:05:13 +00:00
|
|
|
// Gv_SetVar(lVar2, ud.user_name[MAXPLAYERS][32], vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
// return;
|
|
|
|
|
|
|
|
// case USERDEFS_RIDECULE:
|
|
|
|
// if(iSet)
|
|
|
|
// {
|
2008-12-13 08:02:22 +00:00
|
|
|
// ud.ridecule = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
// return;
|
|
|
|
// }
|
2009-01-07 14:05:13 +00:00
|
|
|
// Gv_SetVar(lVar2, ud.ridecule, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
// return;
|
|
|
|
|
|
|
|
// case USERDEFS_SAVEGAME:
|
|
|
|
// if(iSet)
|
|
|
|
// {
|
2008-12-13 08:02:22 +00:00
|
|
|
// ud.savegame = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
// return;
|
|
|
|
// }
|
2009-01-07 14:05:13 +00:00
|
|
|
// Gv_SetVar(lVar2, ud.savegame, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
// return;
|
|
|
|
|
|
|
|
// case USERDEFS_PWLOCKOUT:
|
|
|
|
// if(iSet)
|
|
|
|
// {
|
2008-12-13 08:02:22 +00:00
|
|
|
// ud.pwlockout = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
// return;
|
|
|
|
// }
|
2009-01-07 14:05:13 +00:00
|
|
|
// Gv_SetVar(lVar2, ud.pwlockout, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
// return;
|
|
|
|
|
|
|
|
// case USERDEFS_RTSNAME:
|
|
|
|
// if(iSet)
|
|
|
|
// {
|
2008-12-13 08:02:22 +00:00
|
|
|
// ud.rtsname = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
// return;
|
|
|
|
// }
|
2009-01-07 14:05:13 +00:00
|
|
|
// Gv_SetVar(lVar2, ud.rtsname, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
// return;
|
|
|
|
|
|
|
|
case USERDEFS_OVERHEAD_ON:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.overhead_on = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.overhead_on, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_LAST_OVERHEAD:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.last_overhead = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.last_overhead, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_SHOWWEAPONS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.showweapons = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.showweapons, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_PAUSE_ON:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.pause_on = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.pause_on, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_FROM_BONUS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.from_bonus = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.from_bonus, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_CAMERASPRITE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.camerasprite = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.camerasprite, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_LAST_CAMSPRITE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.last_camsprite = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.last_camsprite, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_LAST_LEVEL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.last_level = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.last_level, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_SECRETLEVEL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.secretlevel = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.secretlevel, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_CONST_VISIBILITY:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.const_visibility = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.const_visibility, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_UW_FRAMERATE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.uw_framerate = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.uw_framerate, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_CAMERA_TIME:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.camera_time = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.camera_time, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_FOLFVEL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.folfvel = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.folfvel, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_FOLAVEL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.folavel = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.folavel, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_FOLX:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.folx = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.folx, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_FOLY:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.foly = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.foly, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_FOLA:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.fola = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.fola, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_RECCNT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.reccnt = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.reccnt, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_ENTERED_NAME:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.entered_name = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.entered_name, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_SCREEN_TILTING:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.screen_tilting = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.screen_tilting, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_SHADOWS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.shadows = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.shadows, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_FTA_ON:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.fta_on = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.fta_on, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_EXECUTIONS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.executions = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.executions, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_AUTO_RUN:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.auto_run = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.auto_run, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_COORDS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.coords = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.coords, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_TICKRATE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.tickrate = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.tickrate, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_M_COOP:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.m_coop = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.m_coop, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_COOP:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.coop = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.coop, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_SCREEN_SIZE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
|
|
|
if (ud.screen_size != lValue)
|
|
|
|
{
|
|
|
|
ud.screen_size = lValue;
|
2008-11-20 14:06:36 +00:00
|
|
|
G_UpdateScreenArea();
|
2008-09-03 04:20:46 +00:00
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.screen_size, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_LOCKOUT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.lockout = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.lockout, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_CROSSHAIR:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.crosshair = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.crosshair, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
// case USERDEFS_WCHOICE:
|
|
|
|
// if(iSet)
|
|
|
|
// {
|
2008-12-13 08:02:22 +00:00
|
|
|
// ud.wchoice = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
// return;
|
|
|
|
// }
|
2009-01-07 14:05:13 +00:00
|
|
|
// Gv_SetVar(lVar2, ud.wchoice, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
// return;
|
|
|
|
|
|
|
|
case USERDEFS_PLAYERAI:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.playerai = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.playerai, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_RESPAWN_MONSTERS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.respawn_monsters = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.respawn_monsters, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_RESPAWN_ITEMS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.respawn_items = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.respawn_items, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_RESPAWN_INVENTORY:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.respawn_inventory = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.respawn_inventory, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_RECSTAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.recstat = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.recstat, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_MONSTERS_OFF:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.monsters_off = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.monsters_off, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_BRIGHTNESS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.brightness = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.brightness, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_M_RESPAWN_ITEMS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.m_respawn_items = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.m_respawn_items, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_M_RESPAWN_MONSTERS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.m_respawn_monsters = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.m_respawn_monsters, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_M_RESPAWN_INVENTORY:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.m_respawn_inventory = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.m_respawn_inventory, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_M_RECSTAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.m_recstat = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.m_recstat, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_M_MONSTERS_OFF:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.m_monsters_off = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.m_monsters_off, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_DETAIL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.detail = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.detail, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_M_FFIRE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.m_ffire = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.m_ffire, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_FFIRE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.ffire = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.ffire, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_M_PLAYER_SKILL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.m_player_skill = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.m_player_skill, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_M_LEVEL_NUMBER:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.m_level_number = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.m_level_number, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_M_VOLUME_NUMBER:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.m_volume_number = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.m_volume_number, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_MULTIMODE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.multimode = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.multimode, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_PLAYER_SKILL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.player_skill = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.player_skill, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_LEVEL_NUMBER:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.level_number = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.level_number, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_VOLUME_NUMBER:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.volume_number = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.volume_number, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_M_MARKER:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.m_marker = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.m_marker, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_MARKER:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.marker = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.marker, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_MOUSEFLIP:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.mouseflip = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.mouseflip, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_STATUSBARSCALE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.statusbarscale = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.statusbarscale, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_DRAWWEAPON:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.drawweapon = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.drawweapon, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_MOUSEAIMING:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.mouseaiming = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.mouseaiming, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_WEAPONSWITCH:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.weaponswitch = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.weaponswitch, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_DEMOCAMS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.democams = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.democams, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_COLOR:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.color = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.color, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_MSGDISPTIME:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.msgdisptime = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.msgdisptime, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_STATUSBARMODE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.statusbarmode = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.statusbarmode, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_M_NOEXITS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.m_noexits = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.m_noexits, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_NOEXITS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.noexits = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.noexits, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_AUTOVOTE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.autovote = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.autovote, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_AUTOMSG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.automsg = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.automsg, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_IDPLAYERS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.idplayers = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.idplayers, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_TEAM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.team = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.team, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_VIEWBOB:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.viewbob = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.viewbob, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_WEAPONSWAY:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.weaponsway = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.weaponsway, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_ANGLEINTERPOLATION:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.angleinterpolation = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.angleinterpolation, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_OBITUARIES:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.obituaries = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.obituaries, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_LEVELSTATS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.levelstats = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.levelstats, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_CROSSHAIRSCALE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.crosshairscale = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.crosshairscale, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_ALTHUD:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.althud = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.althud, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_DISPLAY_BONUS_SCREEN:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.display_bonus_screen = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.display_bonus_screen, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
2008-09-29 02:12:53 +00:00
|
|
|
case USERDEFS_SHOW_LEVEL_TEXT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.show_level_text = lValue;
|
2008-09-29 02:12:53 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.show_level_text, vm.g_i, vm.g_p);
|
2008-09-29 02:12:53 +00:00
|
|
|
return;
|
|
|
|
|
2008-10-05 11:51:59 +00:00
|
|
|
case USERDEFS_WEAPONSCALE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.weaponscale = lValue;
|
2008-10-05 11:51:59 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.weaponscale, vm.g_i, vm.g_p);
|
2008-10-05 11:51:59 +00:00
|
|
|
return;
|
|
|
|
|
2008-10-11 09:20:04 +00:00
|
|
|
case USERDEFS_TEXTSCALE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.textscale = lValue;
|
2008-10-11 09:20:04 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ud.textscale, vm.g_i, vm.g_p);
|
2008-10-11 09:20:04 +00:00
|
|
|
return;
|
|
|
|
|
2008-09-03 04:20:46 +00:00
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-12-13 08:02:22 +00:00
|
|
|
static inline void X_AccessActiveProjectile(int iSet, int lVar1, int lLabelID, int lVar2)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2009-01-07 14:05:13 +00:00
|
|
|
int lValue=0,proj=vm.g_i;
|
2008-09-03 04:20:46 +00:00
|
|
|
|
|
|
|
if (lVar1 != g_iThisActorID)
|
2009-01-07 14:05:13 +00:00
|
|
|
proj=Gv_GetVar(lVar1, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
|
2008-11-20 14:06:36 +00:00
|
|
|
if ((proj < 0 || proj >= MAXSPRITES) && g_scriptSanityChecks)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2008-11-20 14:06:36 +00:00
|
|
|
// OSD_Printf("X_AccessActiveProjectile(): invalid projectile (%d)\n",proj);
|
|
|
|
OSD_Printf(CON_ERROR "tried to %s %s on invalid target projectile (%d) %d %d from %s\n",g_errorLineNum,keyw[g_tw],
|
2009-01-07 14:05:13 +00:00
|
|
|
iSet?"set":"get",ProjectileLabels[lLabelID].name,proj,vm.g_i,vm.g_sp->picnum,
|
2008-09-03 04:20:46 +00:00
|
|
|
(lVar1<MAXGAMEVARS)?aGameVars[lVar1].szLabel:"extended");
|
|
|
|
insptr += (lVar2 == MAXGAMEVARS);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2008-12-13 08:02:22 +00:00
|
|
|
if (iSet)
|
2009-01-07 14:05:13 +00:00
|
|
|
lValue=Gv_GetVar(lVar2, vm.g_i, vm.g_p);
|
2008-12-13 08:02:22 +00:00
|
|
|
|
2008-09-03 04:20:46 +00:00
|
|
|
switch (lLabelID)
|
|
|
|
{
|
|
|
|
case PROJ_WORKSLIKE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[proj].projectile.workslike=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[proj].projectile.workslike, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_SPAWNS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[proj].projectile.spawns=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[proj].projectile.spawns, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_SXREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[proj].projectile.sxrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[proj].projectile.sxrepeat, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_SYREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[proj].projectile.syrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[proj].projectile.syrepeat, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_SOUND:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[proj].projectile.sound=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[proj].projectile.sound, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_ISOUND:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[proj].projectile.isound=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[proj].projectile.isound, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_VEL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[proj].projectile.vel=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[proj].projectile.vel, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_EXTRA:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[proj].projectile.extra=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[proj].projectile.extra, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_DECAL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[proj].projectile.decal=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[proj].projectile.decal, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_TRAIL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[proj].projectile.trail=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[proj].projectile.trail, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_TXREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[proj].projectile.txrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[proj].projectile.txrepeat, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_TYREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[proj].projectile.tyrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[proj].projectile.tyrepeat, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_TOFFSET:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[proj].projectile.toffset=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[proj].projectile.toffset, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_TNUM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[proj].projectile.tnum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[proj].projectile.tnum, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_DROP:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[proj].projectile.drop=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[proj].projectile.drop, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_CSTAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[proj].projectile.cstat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[proj].projectile.cstat, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_CLIPDIST:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[proj].projectile.clipdist=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[proj].projectile.clipdist, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_SHADE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[proj].projectile.shade=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[proj].projectile.shade, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_XREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[proj].projectile.xrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[proj].projectile.xrepeat, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_YREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[proj].projectile.yrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[proj].projectile.yrepeat, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_PAL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[proj].projectile.pal=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[proj].projectile.pal, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_EXTRA_RAND:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[proj].projectile.extra_rand=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[proj].projectile.extra_rand, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_HITRADIUS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[proj].projectile.hitradius=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[proj].projectile.hitradius, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_VEL_MULT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[proj].projectile.velmult=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[proj].projectile.velmult, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_OFFSET:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[proj].projectile.offset=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[proj].projectile.offset, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_BOUNCES:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[proj].projectile.bounces=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[proj].projectile.bounces, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_BSOUND:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[proj].projectile.bsound=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[proj].projectile.bsound, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_RANGE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[proj].projectile.range=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[proj].projectile.range, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-12-13 08:02:22 +00:00
|
|
|
static inline void X_AccessPlayer(int iSet, int lVar1, int lLabelID, int lVar2, int lParm2)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
int lValue=0;
|
2009-01-07 14:05:13 +00:00
|
|
|
int iPlayer=vm.g_p;
|
2008-09-03 04:20:46 +00:00
|
|
|
|
|
|
|
if (lVar1 != g_iThisActorID)
|
2009-01-07 14:05:13 +00:00
|
|
|
iPlayer=Gv_GetVar(lVar1, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
|
2008-11-20 14:06:36 +00:00
|
|
|
if ((iPlayer<0 || iPlayer >= ud.multimode) && g_scriptSanityChecks)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2009-01-07 14:05:13 +00:00
|
|
|
// OSD_Printf("X_AccessPlayer(): invalid target player (%d) %d\n",iPlayer,vm.g_i);
|
2008-11-20 14:06:36 +00:00
|
|
|
OSD_Printf(CON_ERROR "tried to %s %s on invalid target player (%d) from spr %d gv %s\n",g_errorLineNum,keyw[g_tw],
|
2009-01-07 14:05:13 +00:00
|
|
|
iSet?"set":"get",PlayerLabels[lLabelID].name,iPlayer,vm.g_i,
|
2008-09-03 04:20:46 +00:00
|
|
|
(lVar1<MAXGAMEVARS)?aGameVars[lVar1].szLabel:"extended");
|
|
|
|
insptr += (lVar2 == MAXGAMEVARS);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2008-11-20 14:06:36 +00:00
|
|
|
if ((PlayerLabels[lLabelID].flags & LABEL_HASPARM2 && (lParm2 < 0 || lParm2 >= PlayerLabels[lLabelID].maxParm2)) && g_scriptSanityChecks)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2008-11-20 14:06:36 +00:00
|
|
|
OSD_Printf(CON_ERROR "tried to %s invalid %s position %d on player (%d) from spr %d\n",g_errorLineNum,keyw[g_tw],
|
2009-01-07 14:05:13 +00:00
|
|
|
iSet?"set":"get",PlayerLabels[lLabelID].name,lParm2,iPlayer,vm.g_i);
|
2008-09-03 04:20:46 +00:00
|
|
|
insptr += (lVar2 == MAXGAMEVARS);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2008-12-13 08:02:22 +00:00
|
|
|
if (iSet)
|
2009-01-07 14:05:13 +00:00
|
|
|
lValue=Gv_GetVar(lVar2, vm.g_i, vm.g_p);
|
2008-12-13 08:02:22 +00:00
|
|
|
|
2008-09-03 04:20:46 +00:00
|
|
|
switch (lLabelID)
|
|
|
|
{
|
|
|
|
case PLAYER_ZOOM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->zoom=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->zoom, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_EXITX:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->exitx=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->exitx, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_EXITY:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->exity=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->exity, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_LOOGIEX:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->loogiex[lParm2]=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->loogiex[lParm2], vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_LOOGIEY:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->loogiey[lParm2]=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->loogiey[lParm2], vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_NUMLOOGS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->numloogs=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->numloogs, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_LOOGCNT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->loogcnt=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->loogcnt, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_POSX:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->posx=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->posx, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_POSY:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->posy=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->posy, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_POSZ:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->posz=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->posz, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_HORIZ:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->horiz=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->horiz, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_OHORIZ:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->ohoriz=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->ohoriz, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_OHORIZOFF:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->ohorizoff=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->ohorizoff, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_INVDISPTIME:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->invdisptime=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->invdisptime, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_BOBPOSX:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->bobposx=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->bobposx, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_BOBPOSY:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->bobposy=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->bobposy, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_OPOSX:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->oposx=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->oposx, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_OPOSY:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->oposy=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->oposy, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_OPOSZ:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->oposz=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->oposz, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_PYOFF:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->pyoff=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->pyoff, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_OPYOFF:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->opyoff=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->opyoff, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_POSXV:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->posxv=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->posxv, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_POSYV:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->posyv=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->posyv, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_POSZV:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->poszv=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->poszv, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_LAST_PISSED_TIME:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->last_pissed_time=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->last_pissed_time, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_TRUEFZ:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->truefz=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->truefz, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_TRUECZ:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->truecz=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->truecz, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_PLAYER_PAR:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->player_par=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->player_par, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_VISIBILITY:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->visibility=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->visibility, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_BOBCOUNTER:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->bobcounter=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->bobcounter, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_WEAPON_SWAY:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->weapon_sway=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->weapon_sway, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_PALS_TIME:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->pals_time=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->pals_time, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_RANDOMFLAMEX:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->randomflamex=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->randomflamex, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_CRACK_TIME:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->crack_time=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->crack_time, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_AIM_MODE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->aim_mode=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->aim_mode, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_ANG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->ang=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->ang, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_OANG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->oang=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->oang, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_ANGVEL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->angvel=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->angvel, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_CURSECTNUM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->cursectnum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->cursectnum, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_LOOK_ANG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->look_ang=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->look_ang, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_LAST_EXTRA:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->last_extra=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->last_extra, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_SUBWEAPON:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->subweapon=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->subweapon, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_AMMO_AMOUNT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->ammo_amount[lParm2]=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->ammo_amount[lParm2], vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_WACKEDBYACTOR:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->wackedbyactor=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->wackedbyactor, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_FRAG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->frag=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->frag, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_FRAGGEDSELF:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->fraggedself=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->fraggedself, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_CURR_WEAPON:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->curr_weapon=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->curr_weapon, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_LAST_WEAPON:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->last_weapon=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->last_weapon, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_TIPINCS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->tipincs=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->tipincs, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_HORIZOFF:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->horizoff=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->horizoff, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_WANTWEAPONFIRE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->wantweaponfire=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->wantweaponfire, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_HOLODUKE_AMOUNT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->holoduke_amount=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->holoduke_amount, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_NEWOWNER:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->newowner=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->newowner, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_HURT_DELAY:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->hurt_delay=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->hurt_delay, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_HBOMB_HOLD_DELAY:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->hbomb_hold_delay=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->hbomb_hold_delay, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_JUMPING_COUNTER:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->jumping_counter=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->jumping_counter, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_AIRLEFT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->airleft=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->airleft, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_KNEE_INCS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->knee_incs=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->knee_incs, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_ACCESS_INCS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->access_incs=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->access_incs, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_FTA:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->fta=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->fta, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_FTQ:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->ftq=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->ftq, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_ACCESS_WALLNUM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->access_wallnum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->access_wallnum, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_ACCESS_SPRITENUM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->access_spritenum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->access_spritenum, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_KICKBACK_PIC:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->kickback_pic=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->kickback_pic, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_GOT_ACCESS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->got_access=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->got_access, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_WEAPON_ANG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->weapon_ang=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->weapon_ang, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_FIRSTAID_AMOUNT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->firstaid_amount=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->firstaid_amount, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_SOMETHINGONPLAYER:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->somethingonplayer=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->somethingonplayer, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_ON_CRANE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->on_crane=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->on_crane, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_I:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->i=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->i, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_ONE_PARALLAX_SECTNUM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->one_parallax_sectnum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->one_parallax_sectnum, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_OVER_SHOULDER_ON:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->over_shoulder_on=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->over_shoulder_on, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_RANDOM_CLUB_FRAME:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->random_club_frame=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->random_club_frame, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_FIST_INCS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->fist_incs=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->fist_incs, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_ONE_EIGHTY_COUNT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->one_eighty_count=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->one_eighty_count, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_CHEAT_PHASE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->cheat_phase=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->cheat_phase, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_DUMMYPLAYERSPRITE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->dummyplayersprite=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->dummyplayersprite, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_EXTRA_EXTRA8:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->extra_extra8=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->extra_extra8, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_QUICK_KICK:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->quick_kick=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->quick_kick, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_HEAT_AMOUNT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->heat_amount=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->heat_amount, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_ACTORSQU:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->actorsqu=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->actorsqu, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_TIMEBEFOREEXIT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->timebeforeexit=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->timebeforeexit, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_CUSTOMEXITSOUND:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->customexitsound=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->customexitsound, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_WEAPRECS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->weaprecs[15]=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->weaprecs[15], vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_WEAPRECCNT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->weapreccnt=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->weapreccnt, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_INTERFACE_TOGGLE_FLAG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->interface_toggle_flag=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->interface_toggle_flag, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_ROTSCRNANG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->rotscrnang=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->rotscrnang, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_DEAD_FLAG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->dead_flag=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->dead_flag, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_SHOW_EMPTY_WEAPON:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->show_empty_weapon=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->show_empty_weapon, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_SCUBA_AMOUNT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->scuba_amount=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->scuba_amount, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_JETPACK_AMOUNT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->jetpack_amount=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->jetpack_amount, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_STEROIDS_AMOUNT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->steroids_amount=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->steroids_amount, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_SHIELD_AMOUNT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->shield_amount=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->shield_amount, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_HOLODUKE_ON:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->holoduke_on=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->holoduke_on, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_PYCOUNT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->pycount=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->pycount, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_WEAPON_POS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->weapon_pos=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->weapon_pos, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_FRAG_PS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->frag_ps=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->frag_ps, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_TRANSPORTER_HOLD:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->transporter_hold=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->transporter_hold, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_LAST_FULL_WEAPON:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->last_full_weapon=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->last_full_weapon, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_FOOTPRINTSHADE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->footprintshade=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->footprintshade, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_BOOT_AMOUNT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->boot_amount=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->boot_amount, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_SCREAM_VOICE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->scream_voice=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->scream_voice, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_GM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->gm=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->gm, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_ON_WARPING_SECTOR:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->on_warping_sector=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->on_warping_sector, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_FOOTPRINTCOUNT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->footprintcount=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->footprintcount, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_HBOMB_ON:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->hbomb_on=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->hbomb_on, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_JUMPING_TOGGLE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->jumping_toggle=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->jumping_toggle, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_RAPID_FIRE_HOLD:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->rapid_fire_hold=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->rapid_fire_hold, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_ON_GROUND:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->on_ground=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->on_ground, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
/* case PLAYER_NAME:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->name[32]=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->name[32], vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;*/
|
|
|
|
|
|
|
|
case PLAYER_INVEN_ICON:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->inven_icon=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->inven_icon, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_BUTTONPALETTE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->buttonpalette=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->buttonpalette, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_JETPACK_ON:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->jetpack_on=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->jetpack_on, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_SPRITEBRIDGE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->spritebridge=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->spritebridge, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_LASTRANDOMSPOT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->lastrandomspot=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->lastrandomspot, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_SCUBA_ON:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->scuba_on=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->scuba_on, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_FOOTPRINTPAL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->footprintpal=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->footprintpal, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_HEAT_ON:
|
|
|
|
if (iSet)
|
|
|
|
{
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
if (g_player[iPlayer].ps->heat_on != lValue)
|
|
|
|
{
|
|
|
|
g_player[iPlayer].ps->heat_on=lValue;
|
|
|
|
P_UpdateScreenPal(g_player[iPlayer].ps);
|
|
|
|
}
|
2008-09-03 04:20:46 +00:00
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->heat_on, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_HOLSTER_WEAPON:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->holster_weapon=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->holster_weapon, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_FALLING_COUNTER:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->falling_counter=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->falling_counter, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_GOTWEAPON:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->gotweapon[lParm2]=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->gotweapon[lParm2], vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_REFRESH_INVENTORY:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->refresh_inventory=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->refresh_inventory, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
// case PLAYER_PALETTE:
|
|
|
|
// if(iSet)
|
|
|
|
// {
|
2008-12-13 08:02:22 +00:00
|
|
|
// g_player[iPlayer].ps->palette=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
// }
|
|
|
|
// return; }
|
|
|
|
// {
|
2009-01-07 14:05:13 +00:00
|
|
|
// Gv_SetVar(lVar2, g_player[iPlayer].ps->palette, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
// }
|
|
|
|
// return;
|
|
|
|
|
|
|
|
case PLAYER_TOGGLE_KEY_FLAG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->toggle_key_flag=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->toggle_key_flag, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_KNUCKLE_INCS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->knuckle_incs=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->knuckle_incs, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_WALKING_SND_TOGGLE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->walking_snd_toggle=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->walking_snd_toggle, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_PALOOKUP:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->palookup=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->palookup, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_HARD_LANDING:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->hard_landing=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->hard_landing, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_MAX_SECRET_ROOMS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->max_secret_rooms=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->max_secret_rooms, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_SECRET_ROOMS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->secret_rooms=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->secret_rooms, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_PALS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->pals[lParm2]=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->pals[lParm2], vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_MAX_ACTORS_KILLED:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->max_actors_killed=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->max_actors_killed, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_ACTORS_KILLED:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->actors_killed=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->actors_killed, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_RETURN_TO_CENTER:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->return_to_center=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->return_to_center, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_RUNSPEED:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->runspeed=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->runspeed, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_SBS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->sbs=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->sbs, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_RELOADING:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->reloading=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->reloading, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_AUTO_AIM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->auto_aim=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->auto_aim, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_MOVEMENT_LOCK:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->movement_lock=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->movement_lock, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_SOUND_PITCH:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->sound_pitch=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->sound_pitch, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_WEAPONSWITCH:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->weaponswitch=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->weaponswitch, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_TEAM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->team=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->team, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_MAX_PLAYER_HEALTH:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->max_player_health = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->max_player_health, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_MAX_SHIELD_AMOUNT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->max_shield_amount = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->max_shield_amount, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PLAYER_MAX_AMMO_AMOUNT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->max_ammo_amount[lParm2]=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->max_ammo_amount[lParm2], vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
2008-09-11 09:24:45 +00:00
|
|
|
case PLAYER_LAST_QUICK_KICK:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].ps->last_quick_kick=lValue;
|
2008-09-11 09:24:45 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].ps->last_quick_kick, vm.g_i, vm.g_p);
|
2008-09-11 09:24:45 +00:00
|
|
|
return;
|
|
|
|
|
2008-09-03 04:20:46 +00:00
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-12-13 08:02:22 +00:00
|
|
|
static inline void X_AccessPlayerInput(int iSet, int lVar1, int lLabelID, int lVar2)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
int lValue=0;
|
2009-01-07 14:05:13 +00:00
|
|
|
int iPlayer=vm.g_p;
|
2008-09-03 04:20:46 +00:00
|
|
|
|
|
|
|
if (lVar1 != g_iThisActorID)
|
2009-01-07 14:05:13 +00:00
|
|
|
iPlayer=Gv_GetVar(lVar1, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
|
2008-11-20 14:06:36 +00:00
|
|
|
if ((iPlayer<0 || iPlayer >= ud.multimode) && g_scriptSanityChecks)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
|
|
|
insptr += (lVar2 == MAXGAMEVARS);
|
2009-01-07 14:05:13 +00:00
|
|
|
OSD_Printf(CON_ERROR "invalid target player (%d) %d\n",g_errorLineNum,keyw[g_tw],iPlayer,vm.g_i);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2008-12-13 08:02:22 +00:00
|
|
|
if (iSet)
|
2009-01-07 14:05:13 +00:00
|
|
|
lValue=Gv_GetVar(lVar2, vm.g_i, vm.g_p);
|
2008-12-13 08:02:22 +00:00
|
|
|
|
2008-09-03 04:20:46 +00:00
|
|
|
switch (lLabelID)
|
|
|
|
{
|
|
|
|
case INPUT_AVEL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].sync->avel=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].sync->avel, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case INPUT_HORZ:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].sync->horz=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].sync->horz, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case INPUT_FVEL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].sync->fvel=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].sync->fvel, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case INPUT_SVEL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].sync->svel=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].sync->svel, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case INPUT_BITS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].sync->bits=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].sync->bits, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case INPUT_EXTBITS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].sync->extbits=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, g_player[iPlayer].sync->extbits, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-12-13 08:02:22 +00:00
|
|
|
static inline void X_AccessWall(int iSet, int lVar1, int lLabelID, int lVar2)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
int lValue=0;
|
2009-01-07 14:05:13 +00:00
|
|
|
int iWall = Gv_GetVar(lVar1, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
|
2008-11-20 14:06:36 +00:00
|
|
|
if ((iWall<0 || iWall >= numwalls) && g_scriptSanityChecks)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
|
|
|
insptr += (lVar2 == MAXGAMEVARS);
|
2008-11-20 14:06:36 +00:00
|
|
|
OSD_Printf(CON_ERROR "Invalid wall %d\n",g_errorLineNum,keyw[g_tw],iWall);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2008-12-13 08:02:22 +00:00
|
|
|
if (iSet)
|
2009-01-07 14:05:13 +00:00
|
|
|
lValue=Gv_GetVar(lVar2, vm.g_i, vm.g_p);
|
2008-12-13 08:02:22 +00:00
|
|
|
|
2008-09-03 04:20:46 +00:00
|
|
|
switch (lLabelID)
|
|
|
|
{
|
|
|
|
case WALL_X:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].x=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, wall[iWall].x, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_Y:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].y=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, wall[iWall].y, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_POINT2:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].point2=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, wall[iWall].point2, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_NEXTWALL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].nextwall=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, wall[iWall].nextwall, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_NEXTSECTOR:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].nextsector=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, wall[iWall].nextsector, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_CSTAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].cstat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, wall[iWall].cstat, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_PICNUM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].picnum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, wall[iWall].picnum, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_OVERPICNUM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].overpicnum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, wall[iWall].overpicnum, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_SHADE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].shade=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, wall[iWall].shade, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_PAL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].pal=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, wall[iWall].pal, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_XREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].xrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, wall[iWall].xrepeat, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_YREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].yrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, wall[iWall].yrepeat, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_XPANNING:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].xpanning=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, wall[iWall].xpanning, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_YPANNING:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].ypanning=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, wall[iWall].ypanning, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_LOTAG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].lotag=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, wall[iWall].lotag, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_HITAG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].hitag=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, wall[iWall].hitag, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_EXTRA:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].extra=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, wall[iWall].extra, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-12-13 08:02:22 +00:00
|
|
|
static inline void X_AccessSector(int iSet, int lVar1, int lLabelID, int lVar2)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
int lValue=0;
|
2009-01-07 14:05:13 +00:00
|
|
|
int iSector=sprite[vm.g_i].sectnum;
|
2008-09-03 04:20:46 +00:00
|
|
|
|
|
|
|
if (lVar1 != g_iThisActorID)
|
2009-01-07 14:05:13 +00:00
|
|
|
iSector=Gv_GetVar(lVar1, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
|
2008-11-20 14:06:36 +00:00
|
|
|
if ((iSector<0 || iSector >= numsectors) && g_scriptSanityChecks)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2008-11-20 14:06:36 +00:00
|
|
|
OSD_Printf(CON_ERROR "Invalid sector %d\n",g_errorLineNum,keyw[g_tw],iSector);
|
2008-09-03 04:20:46 +00:00
|
|
|
insptr += (lVar2 == MAXGAMEVARS);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2008-12-13 08:02:22 +00:00
|
|
|
if (iSet)
|
2009-01-07 14:05:13 +00:00
|
|
|
lValue=Gv_GetVar(lVar2, vm.g_i, vm.g_p);
|
2008-12-13 08:02:22 +00:00
|
|
|
|
2008-09-03 04:20:46 +00:00
|
|
|
switch (lLabelID)
|
|
|
|
{
|
|
|
|
case SECTOR_WALLPTR:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].wallptr=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sector[iSector].wallptr,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_WALLNUM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].wallnum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sector[iSector].wallnum,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_CEILINGZ:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].ceilingz=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sector[iSector].ceilingz,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_FLOORZ:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].floorz=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sector[iSector].floorz,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_CEILINGSTAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].ceilingstat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sector[iSector].ceilingstat,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_FLOORSTAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].floorstat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sector[iSector].floorstat,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_CEILINGPICNUM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].ceilingpicnum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sector[iSector].ceilingpicnum,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_CEILINGSLOPE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].ceilingheinum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sector[iSector].ceilingheinum,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_CEILINGSHADE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].ceilingshade=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sector[iSector].ceilingshade,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_CEILINGPAL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].ceilingpal=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sector[iSector].ceilingpal,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_CEILINGXPANNING:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].ceilingxpanning=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sector[iSector].ceilingxpanning,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_CEILINGYPANNING:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].ceilingypanning=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sector[iSector].ceilingypanning,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_FLOORPICNUM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].floorpicnum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sector[iSector].floorpicnum,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_FLOORSLOPE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].floorheinum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sector[iSector].floorheinum,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_FLOORSHADE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].floorshade=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sector[iSector].floorshade,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_FLOORPAL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].floorpal=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sector[iSector].floorpal,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_FLOORXPANNING:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].floorxpanning=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sector[iSector].floorxpanning,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_FLOORYPANNING:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].floorypanning=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sector[iSector].floorypanning,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_VISIBILITY:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].visibility=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sector[iSector].visibility,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_ALIGNTO:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].filler=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sector[iSector].filler,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_LOTAG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].lotag=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sector[iSector].lotag,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_HITAG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].hitag=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sector[iSector].hitag,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_EXTRA:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].extra=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sector[iSector].extra,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-12-13 08:02:22 +00:00
|
|
|
static inline void X_AccessSprite(int iSet, int lVar1, int lLabelID, int lVar2, int lParm2)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
int lValue=0;
|
2009-01-07 14:05:13 +00:00
|
|
|
int iActor=vm.g_i;
|
2008-09-03 04:20:46 +00:00
|
|
|
|
|
|
|
if (lVar1 != g_iThisActorID)
|
2009-01-07 14:05:13 +00:00
|
|
|
iActor=Gv_GetVar(lVar1, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
|
2008-11-20 14:06:36 +00:00
|
|
|
if ((iActor < 0 || iActor >= MAXSPRITES) && g_scriptSanityChecks)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2008-11-20 14:06:36 +00:00
|
|
|
OSD_Printf(CON_ERROR "tried to %s %s on invalid target sprite (%d) from spr %d pic %d gv %s\n",g_errorLineNum,keyw[g_tw],
|
2009-01-07 14:05:13 +00:00
|
|
|
iSet?"set":"get",ActorLabels[lLabelID].name,iActor,vm.g_i,vm.g_sp->picnum,
|
2008-09-03 04:20:46 +00:00
|
|
|
(lVar1<MAXGAMEVARS)?aGameVars[lVar1].szLabel:"extended");
|
|
|
|
insptr += (lVar2 == MAXGAMEVARS);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2008-11-20 14:06:36 +00:00
|
|
|
if ((ActorLabels[lLabelID].flags & LABEL_HASPARM2 && (lParm2 < 0 || lParm2 >= ActorLabels[lLabelID].maxParm2)) && g_scriptSanityChecks)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2008-11-20 14:06:36 +00:00
|
|
|
OSD_Printf(CON_ERROR "tried to %s invalid %s position %d on sprite (%d) from spr %d\n",g_errorLineNum,keyw[g_tw],
|
2009-01-07 14:05:13 +00:00
|
|
|
iSet?"set":"get",ActorLabels[lLabelID].name,lParm2,iActor,vm.g_i);
|
2008-09-03 04:20:46 +00:00
|
|
|
insptr += (lVar2 == MAXGAMEVARS);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2008-12-13 08:02:22 +00:00
|
|
|
if (iSet)
|
2009-01-07 14:05:13 +00:00
|
|
|
lValue=Gv_GetVar(lVar2, vm.g_i, vm.g_p);
|
2008-12-13 08:02:22 +00:00
|
|
|
|
2008-09-03 04:20:46 +00:00
|
|
|
switch (lLabelID)
|
|
|
|
{
|
|
|
|
case ACTOR_X:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sprite[iActor].x=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sprite[iActor].x,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_Y:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sprite[iActor].y=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sprite[iActor].y,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_Z:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sprite[iActor].z=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sprite[iActor].z,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_CSTAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sprite[iActor].cstat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sprite[iActor].cstat,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_PICNUM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sprite[iActor].picnum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sprite[iActor].picnum,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_SHADE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sprite[iActor].shade=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sprite[iActor].shade,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_PAL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sprite[iActor].pal=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sprite[iActor].pal,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_CLIPDIST:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sprite[iActor].clipdist=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sprite[iActor].clipdist,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_DETAIL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sprite[iActor].filler=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sprite[iActor].filler,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_XREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sprite[iActor].xrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sprite[iActor].xrepeat,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_YREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sprite[iActor].yrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sprite[iActor].yrepeat,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_XOFFSET:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sprite[iActor].xoffset=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sprite[iActor].xoffset,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_YOFFSET:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sprite[iActor].yoffset=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sprite[iActor].yoffset,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_SECTNUM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
changespritesect(iActor,lValue);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sprite[iActor].sectnum,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_STATNUM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
changespritestat(iActor,lValue);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sprite[iActor].statnum,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_ANG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sprite[iActor].ang=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sprite[iActor].ang,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_OWNER:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sprite[iActor].owner=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sprite[iActor].owner,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_XVEL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sprite[iActor].xvel=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sprite[iActor].xvel,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_YVEL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sprite[iActor].yvel=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sprite[iActor].yvel,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_ZVEL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sprite[iActor].zvel=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sprite[iActor].zvel,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_LOTAG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sprite[iActor].lotag=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sprite[iActor].lotag,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HITAG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sprite[iActor].hitag=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sprite[iActor].hitag,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_EXTRA:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sprite[iActor].extra=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, sprite[iActor].extra,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTCGG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[iActor].cgg=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[iActor].cgg, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTPICNUM :
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[iActor].picnum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[iActor].picnum, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTANG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[iActor].ang=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[iActor].ang, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTEXTRA:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[iActor].extra=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2,ActorExtra[iActor].extra, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTOWNER:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[iActor].owner=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2,ActorExtra[iActor].owner, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTMOVFLAG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[iActor].movflag=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2,ActorExtra[iActor].movflag, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTTEMPANG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[iActor].tempang=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2,ActorExtra[iActor].tempang, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTACTORSTAYPUT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[iActor].actorstayput=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2,ActorExtra[iActor].actorstayput, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTDISPICNUM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[iActor].dispicnum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2,ActorExtra[iActor].dispicnum, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTTIMETOSLEEP:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[iActor].timetosleep=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2,ActorExtra[iActor].timetosleep, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTFLOORZ:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[iActor].floorz=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2,ActorExtra[iActor].floorz, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTCEILINGZ:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[iActor].ceilingz=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2,ActorExtra[iActor].ceilingz, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTLASTVX:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[iActor].lastvx=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2,ActorExtra[iActor].lastvx, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTLASTVY:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[iActor].lastvy=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2,ActorExtra[iActor].lastvy, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTBPOSX:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[iActor].bposx=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2,ActorExtra[iActor].bposx, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTBPOSY:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[iActor].bposy=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2,ActorExtra[iActor].bposy, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTBPOSZ:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[iActor].bposz=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2,ActorExtra[iActor].bposz, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTG_T:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[iActor].temp_data[lParm2]=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ActorExtra[iActor].temp_data[lParm2], vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_ANGOFF:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].angoff=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2,spriteext[iActor].angoff, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_PITCH:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].pitch=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2,spriteext[iActor].pitch, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_ROLL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].roll=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2,spriteext[iActor].roll, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_MDXOFF:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].xoff=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2,spriteext[iActor].xoff, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_MDYOFF:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].yoff=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2,spriteext[iActor].yoff, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_MDZOFF:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].zoff=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2,spriteext[iActor].zoff, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_MDFLAGS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].flags=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2,spriteext[iActor].flags, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_XPANNING:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].xpanning=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, spriteext[iActor].xpanning,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_YPANNING:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].ypanning=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, spriteext[iActor].ypanning,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTFLAGS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ActorExtra[iActor].flags=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2,ActorExtra[iActor].flags, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-12-13 08:02:22 +00:00
|
|
|
static inline void X_AccessTsprite(int iSet, int lVar1, int lLabelID, int lVar2)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
int lValue=0;
|
2009-01-07 14:05:13 +00:00
|
|
|
int iActor=vm.g_i;
|
2008-09-03 04:20:46 +00:00
|
|
|
|
|
|
|
if (lVar1 != g_iThisActorID)
|
2009-01-07 14:05:13 +00:00
|
|
|
iActor=Gv_GetVar(lVar1, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
|
2008-11-20 14:06:36 +00:00
|
|
|
if ((iActor < 0 || iActor >= MAXSPRITES) && g_scriptSanityChecks)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2009-01-07 14:05:13 +00:00
|
|
|
OSD_Printf(CON_ERROR "invalid target sprite (%d) %d %d\n",g_errorLineNum,keyw[g_tw],iActor,vm.g_i,vm.g_sp->picnum);
|
2008-09-03 04:20:46 +00:00
|
|
|
insptr += (lVar2 == MAXGAMEVARS);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2008-12-13 08:02:22 +00:00
|
|
|
if (iSet)
|
2009-01-07 14:05:13 +00:00
|
|
|
lValue=Gv_GetVar(lVar2, vm.g_i, vm.g_p);
|
2008-12-13 08:02:22 +00:00
|
|
|
|
2008-11-20 14:06:36 +00:00
|
|
|
if ((!spriteext[iActor].tspr) && g_scriptSanityChecks)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2008-11-20 14:06:36 +00:00
|
|
|
OSD_Printf(CON_ERROR "Internal bug, tsprite is unavailable\n",g_errorLineNum,keyw[g_tw]);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (lLabelID)
|
|
|
|
{
|
|
|
|
case ACTOR_X:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->x=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, spriteext[iActor].tspr->x,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_Y:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->y=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, spriteext[iActor].tspr->y,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_Z:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->z=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, spriteext[iActor].tspr->z,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_CSTAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->cstat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, spriteext[iActor].tspr->cstat,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_PICNUM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->picnum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, spriteext[iActor].tspr->picnum,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_SHADE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->shade=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, spriteext[iActor].tspr->shade,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_PAL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->pal=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, spriteext[iActor].tspr->pal,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_CLIPDIST:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->clipdist=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, spriteext[iActor].tspr->clipdist,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_DETAIL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->filler=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, spriteext[iActor].tspr->filler,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_XREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->xrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, spriteext[iActor].tspr->xrepeat,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_YREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->yrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, spriteext[iActor].tspr->yrepeat,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_XOFFSET:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->xoffset=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, spriteext[iActor].tspr->xoffset,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_YOFFSET:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->yoffset=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, spriteext[iActor].tspr->yoffset,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_SECTNUM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->sectnum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, spriteext[iActor].tspr->sectnum,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_STATNUM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->statnum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, spriteext[iActor].tspr->statnum,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_ANG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->ang=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, spriteext[iActor].tspr->ang,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_OWNER:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->owner=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, spriteext[iActor].tspr->owner,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
#if 1
|
|
|
|
case ACTOR_XVEL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->xvel=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, spriteext[iActor].tspr->xvel,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_YVEL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->yvel=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, spriteext[iActor].tspr->yvel,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_ZVEL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->zvel=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, spriteext[iActor].tspr->zvel,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_LOTAG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->lotag=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, spriteext[iActor].tspr->lotag,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HITAG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->hitag=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, spriteext[iActor].tspr->hitag,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_EXTRA:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->extra=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, spriteext[iActor].tspr->extra,vm.g_i,vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-12-13 08:02:22 +00:00
|
|
|
static inline void X_AccessProjectile(int iSet, int lVar1, int lLabelID, int lVar2)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
int lValue=0;
|
|
|
|
|
2008-11-20 14:06:36 +00:00
|
|
|
if ((lVar1 < 0 || lVar1 >= MAXTILES) && g_scriptSanityChecks)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2008-11-20 14:06:36 +00:00
|
|
|
OSD_Printf(CON_ERROR "invalid tile (%d)\n",g_errorLineNum,keyw[g_tw],lVar1);
|
2008-09-03 04:20:46 +00:00
|
|
|
insptr += (lVar2 == MAXGAMEVARS);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2008-12-13 08:02:22 +00:00
|
|
|
if (iSet)
|
2009-01-07 14:05:13 +00:00
|
|
|
lValue=Gv_GetVar(lVar2, vm.g_i, vm.g_p);
|
2008-12-13 08:02:22 +00:00
|
|
|
|
2008-09-03 04:20:46 +00:00
|
|
|
switch (lLabelID)
|
|
|
|
{
|
|
|
|
case PROJ_WORKSLIKE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ProjectileData[lVar1].workslike=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ProjectileData[lVar1].workslike, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_SPAWNS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ProjectileData[lVar1].spawns=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ProjectileData[lVar1].spawns, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_SXREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ProjectileData[lVar1].sxrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ProjectileData[lVar1].sxrepeat, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_SYREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ProjectileData[lVar1].syrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ProjectileData[lVar1].syrepeat, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_SOUND:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ProjectileData[lVar1].sound=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ProjectileData[lVar1].sound, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_ISOUND:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ProjectileData[lVar1].isound=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ProjectileData[lVar1].isound, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_VEL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ProjectileData[lVar1].vel=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ProjectileData[lVar1].vel, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_EXTRA:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ProjectileData[lVar1].extra=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ProjectileData[lVar1].extra, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_DECAL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ProjectileData[lVar1].decal=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ProjectileData[lVar1].decal, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_TRAIL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ProjectileData[lVar1].trail=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ProjectileData[lVar1].trail, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_TXREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ProjectileData[lVar1].txrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ProjectileData[lVar1].txrepeat, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_TYREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ProjectileData[lVar1].tyrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ProjectileData[lVar1].tyrepeat, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_TOFFSET:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ProjectileData[lVar1].toffset=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ProjectileData[lVar1].toffset, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_TNUM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ProjectileData[lVar1].tnum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ProjectileData[lVar1].tnum, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_DROP:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ProjectileData[lVar1].drop=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ProjectileData[lVar1].drop, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_CSTAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ProjectileData[lVar1].cstat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ProjectileData[lVar1].cstat, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_CLIPDIST:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ProjectileData[lVar1].clipdist=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ProjectileData[lVar1].clipdist, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_SHADE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ProjectileData[lVar1].shade=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ProjectileData[lVar1].shade, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_XREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ProjectileData[lVar1].xrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ProjectileData[lVar1].xrepeat, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_YREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ProjectileData[lVar1].yrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ProjectileData[lVar1].yrepeat, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_PAL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ProjectileData[lVar1].pal=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ProjectileData[lVar1].pal, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_EXTRA_RAND:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ProjectileData[lVar1].extra_rand=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ProjectileData[lVar1].extra_rand, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_HITRADIUS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ProjectileData[lVar1].hitradius=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ProjectileData[lVar1].hitradius, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_VEL_MULT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ProjectileData[lVar1].velmult=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ProjectileData[lVar1].velmult, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_OFFSET:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ProjectileData[lVar1].offset=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ProjectileData[lVar1].offset, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_BOUNCES:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ProjectileData[lVar1].bounces=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ProjectileData[lVar1].bounces, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_BSOUND:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ProjectileData[lVar1].bsound=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ProjectileData[lVar1].bsound, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_RANGE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ProjectileData[lVar1].range=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
Gv_SetVar(lVar2, ProjectileData[lVar1].range, vm.g_i, vm.g_p);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
#else
|
|
|
|
static int X_AccessSpriteX(int iActor, int lLabelID, int lParm2)
|
|
|
|
{
|
|
|
|
if ((ActorLabels[lLabelID].flags & LABEL_HASPARM2 && (lParm2 < 0 || lParm2 >= ActorLabels[lLabelID].maxParm2)) && g_scriptSanityChecks)
|
|
|
|
{
|
|
|
|
OSD_Printf(CON_ERROR "tried to get invalid %s position %d on sprite (%d) from spr %d\n",
|
|
|
|
g_errorLineNum,keyw[g_tw],ActorLabels[lLabelID].name,lParm2,iActor,vm.g_i);
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (lLabelID)
|
|
|
|
{
|
|
|
|
case ACTOR_X: return sprite[iActor].x;
|
|
|
|
case ACTOR_Y: return sprite[iActor].y;
|
|
|
|
case ACTOR_Z: return sprite[iActor].z;
|
|
|
|
case ACTOR_CSTAT: return sprite[iActor].cstat;
|
|
|
|
case ACTOR_PICNUM: return sprite[iActor].picnum;
|
|
|
|
case ACTOR_SHADE: return sprite[iActor].shade;
|
|
|
|
case ACTOR_PAL: return sprite[iActor].pal;
|
|
|
|
case ACTOR_CLIPDIST: return sprite[iActor].clipdist;
|
|
|
|
case ACTOR_DETAIL: return sprite[iActor].filler;
|
|
|
|
case ACTOR_XREPEAT: return sprite[iActor].xrepeat;
|
|
|
|
case ACTOR_YREPEAT: return sprite[iActor].yrepeat;
|
|
|
|
case ACTOR_XOFFSET: return sprite[iActor].xoffset;
|
|
|
|
case ACTOR_YOFFSET: return sprite[iActor].yoffset;
|
|
|
|
case ACTOR_SECTNUM: return sprite[iActor].sectnum;
|
|
|
|
case ACTOR_STATNUM: return sprite[iActor].statnum;
|
|
|
|
case ACTOR_ANG: return sprite[iActor].ang;
|
|
|
|
case ACTOR_OWNER: return sprite[iActor].owner;
|
|
|
|
case ACTOR_XVEL: return sprite[iActor].xvel;
|
|
|
|
case ACTOR_YVEL: return sprite[iActor].yvel;
|
|
|
|
case ACTOR_ZVEL: return sprite[iActor].zvel;
|
|
|
|
case ACTOR_LOTAG: return sprite[iActor].lotag;
|
|
|
|
case ACTOR_HITAG: return sprite[iActor].hitag;
|
|
|
|
case ACTOR_EXTRA: return sprite[iActor].extra;
|
|
|
|
case ACTOR_HTCGG: return ActorExtra[iActor].cgg;
|
|
|
|
case ACTOR_HTPICNUM : return ActorExtra[iActor].picnum;
|
|
|
|
case ACTOR_HTANG: return ActorExtra[iActor].ang;
|
|
|
|
case ACTOR_HTEXTRA: return ActorExtra[iActor].extra;
|
|
|
|
case ACTOR_HTOWNER: return ActorExtra[iActor].owner;
|
|
|
|
case ACTOR_HTMOVFLAG: return ActorExtra[iActor].movflag;
|
|
|
|
case ACTOR_HTTEMPANG: return ActorExtra[iActor].tempang;
|
|
|
|
case ACTOR_HTACTORSTAYPUT: return ActorExtra[iActor].actorstayput;
|
|
|
|
case ACTOR_HTDISPICNUM: return ActorExtra[iActor].dispicnum;
|
|
|
|
case ACTOR_HTTIMETOSLEEP: return ActorExtra[iActor].timetosleep;
|
|
|
|
case ACTOR_HTFLOORZ: return ActorExtra[iActor].floorz;
|
|
|
|
case ACTOR_HTCEILINGZ: return ActorExtra[iActor].ceilingz;
|
|
|
|
case ACTOR_HTLASTVX: return ActorExtra[iActor].lastvx;
|
|
|
|
case ACTOR_HTLASTVY: return ActorExtra[iActor].lastvy;
|
|
|
|
case ACTOR_HTBPOSX: return ActorExtra[iActor].bposx;
|
|
|
|
case ACTOR_HTBPOSY: return ActorExtra[iActor].bposy;
|
|
|
|
case ACTOR_HTBPOSZ: return ActorExtra[iActor].bposz;
|
|
|
|
case ACTOR_HTG_T: return ActorExtra[iActor].temp_data[lParm2];
|
|
|
|
case ACTOR_ANGOFF: return spriteext[iActor].angoff;
|
|
|
|
case ACTOR_PITCH: return spriteext[iActor].pitch;
|
|
|
|
case ACTOR_ROLL: return spriteext[iActor].roll;
|
|
|
|
case ACTOR_MDXOFF: return spriteext[iActor].xoff;
|
|
|
|
case ACTOR_MDYOFF: return spriteext[iActor].yoff;
|
|
|
|
case ACTOR_MDZOFF: return spriteext[iActor].zoff;
|
|
|
|
case ACTOR_MDFLAGS: return spriteext[iActor].flags;
|
|
|
|
case ACTOR_XPANNING: return spriteext[iActor].xpanning;
|
|
|
|
case ACTOR_YPANNING: return spriteext[iActor].ypanning;
|
|
|
|
case ACTOR_HTFLAGS: return ActorExtra[iActor].flags;
|
|
|
|
default: return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static int X_AccessSectorX(int iSector, int lLabelID)
|
|
|
|
{
|
|
|
|
switch (lLabelID)
|
|
|
|
{
|
|
|
|
case SECTOR_WALLPTR: return sector[iSector].wallptr;
|
|
|
|
case SECTOR_WALLNUM: return sector[iSector].wallnum;
|
|
|
|
case SECTOR_CEILINGZ: return sector[iSector].ceilingz;
|
|
|
|
case SECTOR_FLOORZ: return sector[iSector].floorz;
|
|
|
|
case SECTOR_CEILINGSTAT: return sector[iSector].ceilingstat;
|
|
|
|
case SECTOR_FLOORSTAT: return sector[iSector].floorstat;
|
|
|
|
case SECTOR_CEILINGPICNUM: return sector[iSector].ceilingpicnum;
|
|
|
|
case SECTOR_CEILINGSLOPE: return sector[iSector].ceilingheinum;
|
|
|
|
case SECTOR_CEILINGSHADE: return sector[iSector].ceilingshade;
|
|
|
|
case SECTOR_CEILINGPAL: return sector[iSector].ceilingpal;
|
|
|
|
case SECTOR_CEILINGXPANNING: return sector[iSector].ceilingxpanning;
|
|
|
|
case SECTOR_CEILINGYPANNING: return sector[iSector].ceilingypanning;
|
|
|
|
case SECTOR_FLOORPICNUM: return sector[iSector].floorpicnum;
|
|
|
|
case SECTOR_FLOORSLOPE: return sector[iSector].floorheinum;
|
|
|
|
case SECTOR_FLOORSHADE: return sector[iSector].floorshade;
|
|
|
|
case SECTOR_FLOORPAL: return sector[iSector].floorpal;
|
|
|
|
case SECTOR_FLOORXPANNING: return sector[iSector].floorxpanning;
|
|
|
|
case SECTOR_FLOORYPANNING: return sector[iSector].floorypanning;
|
|
|
|
case SECTOR_VISIBILITY: return sector[iSector].visibility;
|
|
|
|
case SECTOR_ALIGNTO: return sector[iSector].filler;
|
|
|
|
case SECTOR_LOTAG: return sector[iSector].lotag;
|
|
|
|
case SECTOR_HITAG: return sector[iSector].hitag;
|
|
|
|
case SECTOR_EXTRA: return sector[iSector].extra;
|
|
|
|
default: return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static int X_AccessPlayerX(int iPlayer, int lLabelID, int lParm2)
|
|
|
|
{
|
|
|
|
if ((PlayerLabels[lLabelID].flags & LABEL_HASPARM2 && (lParm2 < 0 || lParm2 >= PlayerLabels[lLabelID].maxParm2)) && g_scriptSanityChecks)
|
|
|
|
{
|
|
|
|
OSD_Printf(CON_ERROR "tried to %s invalid %s position %d on player (%d) from spr %d\n",
|
|
|
|
g_errorLineNum,keyw[g_tw],PlayerLabels[lLabelID].name,lParm2,iPlayer,vm.g_i);
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (lLabelID)
|
|
|
|
{
|
|
|
|
case PLAYER_ZOOM:
|
|
|
|
return g_player[iPlayer].ps->zoom;
|
|
|
|
case PLAYER_EXITX:
|
|
|
|
return g_player[iPlayer].ps->exitx;
|
|
|
|
case PLAYER_EXITY:
|
|
|
|
return g_player[iPlayer].ps->exity;
|
|
|
|
case PLAYER_LOOGIEX:
|
|
|
|
return g_player[iPlayer].ps->loogiex[lParm2];
|
|
|
|
case PLAYER_LOOGIEY:
|
|
|
|
return g_player[iPlayer].ps->loogiey[lParm2];
|
|
|
|
case PLAYER_NUMLOOGS:
|
|
|
|
return g_player[iPlayer].ps->numloogs;
|
|
|
|
case PLAYER_LOOGCNT:
|
|
|
|
return g_player[iPlayer].ps->loogcnt;
|
|
|
|
case PLAYER_POSX:
|
|
|
|
return g_player[iPlayer].ps->posx;
|
|
|
|
case PLAYER_POSY:
|
|
|
|
return g_player[iPlayer].ps->posy;
|
|
|
|
case PLAYER_POSZ:
|
|
|
|
return g_player[iPlayer].ps->posz;
|
|
|
|
case PLAYER_HORIZ:
|
|
|
|
return g_player[iPlayer].ps->horiz;
|
|
|
|
case PLAYER_OHORIZ:
|
|
|
|
return g_player[iPlayer].ps->ohoriz;
|
|
|
|
case PLAYER_OHORIZOFF:
|
|
|
|
return g_player[iPlayer].ps->ohorizoff;
|
|
|
|
case PLAYER_INVDISPTIME:
|
|
|
|
return g_player[iPlayer].ps->invdisptime;
|
|
|
|
case PLAYER_BOBPOSX:
|
|
|
|
return g_player[iPlayer].ps->bobposx;
|
|
|
|
case PLAYER_BOBPOSY:
|
|
|
|
return g_player[iPlayer].ps->bobposy;
|
|
|
|
case PLAYER_OPOSX:
|
|
|
|
return g_player[iPlayer].ps->oposx;
|
|
|
|
case PLAYER_OPOSY:
|
|
|
|
return g_player[iPlayer].ps->oposy;
|
|
|
|
case PLAYER_OPOSZ:
|
|
|
|
return g_player[iPlayer].ps->oposz;
|
|
|
|
case PLAYER_PYOFF:
|
|
|
|
return g_player[iPlayer].ps->pyoff;
|
|
|
|
case PLAYER_OPYOFF:
|
|
|
|
return g_player[iPlayer].ps->opyoff;
|
|
|
|
case PLAYER_POSXV:
|
|
|
|
return g_player[iPlayer].ps->posxv;
|
|
|
|
case PLAYER_POSYV:
|
|
|
|
return g_player[iPlayer].ps->posyv;
|
|
|
|
case PLAYER_POSZV:
|
|
|
|
return g_player[iPlayer].ps->poszv;
|
|
|
|
case PLAYER_LAST_PISSED_TIME:
|
|
|
|
return g_player[iPlayer].ps->last_pissed_time;
|
|
|
|
case PLAYER_TRUEFZ:
|
|
|
|
return g_player[iPlayer].ps->truefz;
|
|
|
|
case PLAYER_TRUECZ:
|
|
|
|
return g_player[iPlayer].ps->truecz;
|
|
|
|
case PLAYER_PLAYER_PAR:
|
|
|
|
return g_player[iPlayer].ps->player_par;
|
|
|
|
case PLAYER_VISIBILITY:
|
|
|
|
return g_player[iPlayer].ps->visibility;
|
|
|
|
case PLAYER_BOBCOUNTER:
|
|
|
|
return g_player[iPlayer].ps->bobcounter;
|
|
|
|
case PLAYER_WEAPON_SWAY:
|
|
|
|
return g_player[iPlayer].ps->weapon_sway;
|
|
|
|
case PLAYER_PALS_TIME:
|
|
|
|
return g_player[iPlayer].ps->pals_time;
|
|
|
|
case PLAYER_RANDOMFLAMEX:
|
|
|
|
return g_player[iPlayer].ps->randomflamex;
|
|
|
|
case PLAYER_CRACK_TIME:
|
|
|
|
return g_player[iPlayer].ps->crack_time;
|
|
|
|
case PLAYER_AIM_MODE:
|
|
|
|
return g_player[iPlayer].ps->aim_mode;
|
|
|
|
case PLAYER_ANG:
|
|
|
|
return g_player[iPlayer].ps->ang;
|
|
|
|
case PLAYER_OANG:
|
|
|
|
return g_player[iPlayer].ps->oang;
|
|
|
|
case PLAYER_ANGVEL:
|
|
|
|
return g_player[iPlayer].ps->angvel;
|
|
|
|
case PLAYER_CURSECTNUM:
|
|
|
|
return g_player[iPlayer].ps->cursectnum;
|
|
|
|
case PLAYER_LOOK_ANG:
|
|
|
|
return g_player[iPlayer].ps->look_ang;
|
|
|
|
case PLAYER_LAST_EXTRA:
|
|
|
|
return g_player[iPlayer].ps->last_extra;
|
|
|
|
case PLAYER_SUBWEAPON:
|
|
|
|
return g_player[iPlayer].ps->subweapon;
|
|
|
|
case PLAYER_AMMO_AMOUNT:
|
|
|
|
return g_player[iPlayer].ps->ammo_amount[lParm2];
|
|
|
|
case PLAYER_WACKEDBYACTOR:
|
|
|
|
return g_player[iPlayer].ps->wackedbyactor;
|
|
|
|
case PLAYER_FRAG:
|
|
|
|
return g_player[iPlayer].ps->frag;
|
|
|
|
case PLAYER_FRAGGEDSELF:
|
|
|
|
return g_player[iPlayer].ps->fraggedself;
|
|
|
|
case PLAYER_CURR_WEAPON:
|
|
|
|
return g_player[iPlayer].ps->curr_weapon;
|
|
|
|
case PLAYER_LAST_WEAPON:
|
|
|
|
return g_player[iPlayer].ps->last_weapon;
|
|
|
|
case PLAYER_TIPINCS:
|
|
|
|
return g_player[iPlayer].ps->tipincs;
|
|
|
|
case PLAYER_HORIZOFF:
|
|
|
|
return g_player[iPlayer].ps->horizoff;
|
|
|
|
case PLAYER_WANTWEAPONFIRE:
|
|
|
|
return g_player[iPlayer].ps->wantweaponfire;
|
|
|
|
case PLAYER_HOLODUKE_AMOUNT:
|
|
|
|
return g_player[iPlayer].ps->holoduke_amount;
|
|
|
|
case PLAYER_NEWOWNER:
|
|
|
|
return g_player[iPlayer].ps->newowner;
|
|
|
|
case PLAYER_HURT_DELAY:
|
|
|
|
return g_player[iPlayer].ps->hurt_delay;
|
|
|
|
case PLAYER_HBOMB_HOLD_DELAY:
|
|
|
|
return g_player[iPlayer].ps->hbomb_hold_delay;
|
|
|
|
case PLAYER_JUMPING_COUNTER:
|
|
|
|
return g_player[iPlayer].ps->jumping_counter;
|
|
|
|
case PLAYER_AIRLEFT:
|
|
|
|
return g_player[iPlayer].ps->airleft;
|
|
|
|
case PLAYER_KNEE_INCS:
|
|
|
|
return g_player[iPlayer].ps->knee_incs;
|
|
|
|
case PLAYER_ACCESS_INCS:
|
|
|
|
return g_player[iPlayer].ps->access_incs;
|
|
|
|
case PLAYER_FTA:
|
|
|
|
return g_player[iPlayer].ps->fta;
|
|
|
|
case PLAYER_FTQ:
|
|
|
|
return g_player[iPlayer].ps->ftq;
|
|
|
|
case PLAYER_ACCESS_WALLNUM:
|
|
|
|
return g_player[iPlayer].ps->access_wallnum;
|
|
|
|
case PLAYER_ACCESS_SPRITENUM:
|
|
|
|
return g_player[iPlayer].ps->access_spritenum;
|
|
|
|
case PLAYER_KICKBACK_PIC:
|
|
|
|
return g_player[iPlayer].ps->kickback_pic;
|
|
|
|
case PLAYER_GOT_ACCESS:
|
|
|
|
return g_player[iPlayer].ps->got_access;
|
|
|
|
case PLAYER_WEAPON_ANG:
|
|
|
|
return g_player[iPlayer].ps->weapon_ang;
|
|
|
|
case PLAYER_FIRSTAID_AMOUNT:
|
|
|
|
return g_player[iPlayer].ps->firstaid_amount;
|
|
|
|
case PLAYER_SOMETHINGONPLAYER:
|
|
|
|
return g_player[iPlayer].ps->somethingonplayer;
|
|
|
|
case PLAYER_ON_CRANE:
|
|
|
|
return g_player[iPlayer].ps->on_crane;
|
|
|
|
case PLAYER_I:
|
|
|
|
return g_player[iPlayer].ps->i;
|
|
|
|
case PLAYER_ONE_PARALLAX_SECTNUM:
|
|
|
|
return g_player[iPlayer].ps->one_parallax_sectnum;
|
|
|
|
case PLAYER_OVER_SHOULDER_ON:
|
|
|
|
return g_player[iPlayer].ps->over_shoulder_on;
|
|
|
|
case PLAYER_RANDOM_CLUB_FRAME:
|
|
|
|
return g_player[iPlayer].ps->random_club_frame;
|
|
|
|
case PLAYER_FIST_INCS:
|
|
|
|
return g_player[iPlayer].ps->fist_incs;
|
|
|
|
case PLAYER_ONE_EIGHTY_COUNT:
|
|
|
|
return g_player[iPlayer].ps->one_eighty_count;
|
|
|
|
case PLAYER_CHEAT_PHASE:
|
|
|
|
return g_player[iPlayer].ps->cheat_phase;
|
|
|
|
case PLAYER_DUMMYPLAYERSPRITE:
|
|
|
|
return g_player[iPlayer].ps->dummyplayersprite;
|
|
|
|
case PLAYER_EXTRA_EXTRA8:
|
|
|
|
return g_player[iPlayer].ps->extra_extra8;
|
|
|
|
case PLAYER_QUICK_KICK:
|
|
|
|
return g_player[iPlayer].ps->quick_kick;
|
|
|
|
case PLAYER_HEAT_AMOUNT:
|
|
|
|
return g_player[iPlayer].ps->heat_amount;
|
|
|
|
case PLAYER_ACTORSQU:
|
|
|
|
return g_player[iPlayer].ps->actorsqu;
|
|
|
|
case PLAYER_TIMEBEFOREEXIT:
|
|
|
|
return g_player[iPlayer].ps->timebeforeexit;
|
|
|
|
case PLAYER_CUSTOMEXITSOUND:
|
|
|
|
return g_player[iPlayer].ps->customexitsound;
|
|
|
|
case PLAYER_WEAPRECS:
|
|
|
|
return g_player[iPlayer].ps->weaprecs[15];
|
|
|
|
case PLAYER_WEAPRECCNT:
|
|
|
|
return g_player[iPlayer].ps->weapreccnt;
|
|
|
|
case PLAYER_INTERFACE_TOGGLE_FLAG:
|
|
|
|
return g_player[iPlayer].ps->interface_toggle_flag;
|
|
|
|
case PLAYER_ROTSCRNANG:
|
|
|
|
return g_player[iPlayer].ps->rotscrnang;
|
|
|
|
case PLAYER_DEAD_FLAG:
|
|
|
|
return g_player[iPlayer].ps->dead_flag;
|
|
|
|
case PLAYER_SHOW_EMPTY_WEAPON:
|
|
|
|
return g_player[iPlayer].ps->show_empty_weapon;
|
|
|
|
case PLAYER_SCUBA_AMOUNT:
|
|
|
|
return g_player[iPlayer].ps->scuba_amount;
|
|
|
|
case PLAYER_JETPACK_AMOUNT:
|
|
|
|
return g_player[iPlayer].ps->jetpack_amount;
|
|
|
|
case PLAYER_STEROIDS_AMOUNT:
|
|
|
|
return g_player[iPlayer].ps->steroids_amount;
|
|
|
|
case PLAYER_SHIELD_AMOUNT:
|
|
|
|
return g_player[iPlayer].ps->shield_amount;
|
|
|
|
case PLAYER_HOLODUKE_ON:
|
|
|
|
return g_player[iPlayer].ps->holoduke_on;
|
|
|
|
case PLAYER_PYCOUNT:
|
|
|
|
return g_player[iPlayer].ps->pycount;
|
|
|
|
case PLAYER_WEAPON_POS:
|
|
|
|
return g_player[iPlayer].ps->weapon_pos;
|
|
|
|
case PLAYER_FRAG_PS:
|
|
|
|
return g_player[iPlayer].ps->frag_ps;
|
|
|
|
case PLAYER_TRANSPORTER_HOLD:
|
|
|
|
return g_player[iPlayer].ps->transporter_hold;
|
|
|
|
case PLAYER_LAST_FULL_WEAPON:
|
|
|
|
return g_player[iPlayer].ps->last_full_weapon;
|
|
|
|
case PLAYER_FOOTPRINTSHADE:
|
|
|
|
return g_player[iPlayer].ps->footprintshade;
|
|
|
|
case PLAYER_BOOT_AMOUNT:
|
|
|
|
return g_player[iPlayer].ps->boot_amount;
|
|
|
|
case PLAYER_SCREAM_VOICE:
|
|
|
|
return g_player[iPlayer].ps->scream_voice;
|
|
|
|
case PLAYER_GM:
|
|
|
|
return g_player[iPlayer].ps->gm;
|
|
|
|
case PLAYER_ON_WARPING_SECTOR:
|
|
|
|
return g_player[iPlayer].ps->on_warping_sector;
|
|
|
|
case PLAYER_FOOTPRINTCOUNT:
|
|
|
|
return g_player[iPlayer].ps->footprintcount;
|
|
|
|
case PLAYER_HBOMB_ON:
|
|
|
|
return g_player[iPlayer].ps->hbomb_on;
|
|
|
|
case PLAYER_JUMPING_TOGGLE:
|
|
|
|
return g_player[iPlayer].ps->jumping_toggle;
|
|
|
|
case PLAYER_RAPID_FIRE_HOLD:
|
|
|
|
return g_player[iPlayer].ps->rapid_fire_hold;
|
|
|
|
case PLAYER_ON_GROUND:
|
|
|
|
return g_player[iPlayer].ps->on_ground;
|
|
|
|
case PLAYER_INVEN_ICON:
|
|
|
|
return g_player[iPlayer].ps->inven_icon;
|
|
|
|
case PLAYER_BUTTONPALETTE:
|
|
|
|
return g_player[iPlayer].ps->buttonpalette;
|
|
|
|
case PLAYER_JETPACK_ON:
|
|
|
|
return g_player[iPlayer].ps->jetpack_on;
|
|
|
|
case PLAYER_SPRITEBRIDGE:
|
|
|
|
return g_player[iPlayer].ps->spritebridge;
|
|
|
|
case PLAYER_LASTRANDOMSPOT:
|
|
|
|
return g_player[iPlayer].ps->lastrandomspot;
|
|
|
|
case PLAYER_SCUBA_ON:
|
|
|
|
return g_player[iPlayer].ps->scuba_on;
|
|
|
|
case PLAYER_FOOTPRINTPAL:
|
|
|
|
return g_player[iPlayer].ps->footprintpal;
|
|
|
|
case PLAYER_HEAT_ON:
|
|
|
|
return g_player[iPlayer].ps->heat_on;
|
|
|
|
case PLAYER_HOLSTER_WEAPON:
|
|
|
|
return g_player[iPlayer].ps->holster_weapon;
|
|
|
|
case PLAYER_FALLING_COUNTER:
|
|
|
|
return g_player[iPlayer].ps->falling_counter;
|
|
|
|
case PLAYER_GOTWEAPON:
|
|
|
|
return g_player[iPlayer].ps->gotweapon[lParm2];
|
|
|
|
case PLAYER_REFRESH_INVENTORY:
|
|
|
|
return g_player[iPlayer].ps->refresh_inventory;
|
|
|
|
case PLAYER_TOGGLE_KEY_FLAG:
|
|
|
|
return g_player[iPlayer].ps->toggle_key_flag;
|
|
|
|
case PLAYER_KNUCKLE_INCS:
|
|
|
|
return g_player[iPlayer].ps->knuckle_incs;
|
|
|
|
case PLAYER_WALKING_SND_TOGGLE:
|
|
|
|
return g_player[iPlayer].ps->walking_snd_toggle;
|
|
|
|
case PLAYER_PALOOKUP:
|
|
|
|
return g_player[iPlayer].ps->palookup;
|
|
|
|
case PLAYER_HARD_LANDING:
|
|
|
|
return g_player[iPlayer].ps->hard_landing;
|
|
|
|
case PLAYER_MAX_SECRET_ROOMS:
|
|
|
|
return g_player[iPlayer].ps->max_secret_rooms;
|
|
|
|
case PLAYER_SECRET_ROOMS:
|
|
|
|
return g_player[iPlayer].ps->secret_rooms;
|
|
|
|
case PLAYER_PALS:
|
|
|
|
return g_player[iPlayer].ps->pals[lParm2];
|
|
|
|
case PLAYER_MAX_ACTORS_KILLED:
|
|
|
|
return g_player[iPlayer].ps->max_actors_killed;
|
|
|
|
case PLAYER_ACTORS_KILLED:
|
|
|
|
return g_player[iPlayer].ps->actors_killed;
|
|
|
|
case PLAYER_RETURN_TO_CENTER:
|
|
|
|
return g_player[iPlayer].ps->return_to_center;
|
|
|
|
case PLAYER_RUNSPEED:
|
|
|
|
return g_player[iPlayer].ps->runspeed;
|
|
|
|
case PLAYER_SBS:
|
|
|
|
return g_player[iPlayer].ps->sbs;
|
|
|
|
case PLAYER_RELOADING:
|
|
|
|
return g_player[iPlayer].ps->reloading;
|
|
|
|
case PLAYER_AUTO_AIM:
|
|
|
|
return g_player[iPlayer].ps->auto_aim;
|
|
|
|
case PLAYER_MOVEMENT_LOCK:
|
|
|
|
return g_player[iPlayer].ps->movement_lock;
|
|
|
|
case PLAYER_SOUND_PITCH:
|
|
|
|
return g_player[iPlayer].ps->sound_pitch;
|
|
|
|
case PLAYER_WEAPONSWITCH:
|
|
|
|
return g_player[iPlayer].ps->weaponswitch;
|
|
|
|
case PLAYER_TEAM:
|
|
|
|
return g_player[iPlayer].ps->team;
|
|
|
|
case PLAYER_MAX_PLAYER_HEALTH:
|
|
|
|
return g_player[iPlayer].ps->max_player_health;
|
|
|
|
case PLAYER_MAX_SHIELD_AMOUNT:
|
|
|
|
return g_player[iPlayer].ps->max_shield_amount;
|
|
|
|
case PLAYER_MAX_AMMO_AMOUNT:
|
|
|
|
return g_player[iPlayer].ps->max_ammo_amount[lParm2];
|
|
|
|
case PLAYER_LAST_QUICK_KICK:
|
|
|
|
return g_player[iPlayer].ps->last_quick_kick;
|
|
|
|
default:
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static int X_AccessWallX(int iWall, int lLabelID)
|
|
|
|
{
|
|
|
|
switch (lLabelID)
|
|
|
|
{
|
|
|
|
case WALL_X:
|
|
|
|
return wall[iWall].x;
|
|
|
|
case WALL_Y:
|
|
|
|
return wall[iWall].y;
|
|
|
|
case WALL_POINT2:
|
|
|
|
return wall[iWall].point2;
|
|
|
|
case WALL_NEXTWALL:
|
|
|
|
return wall[iWall].nextwall;
|
|
|
|
case WALL_NEXTSECTOR:
|
|
|
|
return wall[iWall].nextsector;
|
|
|
|
case WALL_CSTAT:
|
|
|
|
return wall[iWall].cstat;
|
|
|
|
case WALL_PICNUM:
|
|
|
|
return wall[iWall].picnum;
|
|
|
|
case WALL_OVERPICNUM:
|
|
|
|
return wall[iWall].overpicnum;
|
|
|
|
case WALL_SHADE:
|
|
|
|
return wall[iWall].shade;
|
|
|
|
case WALL_PAL:
|
|
|
|
return wall[iWall].pal;
|
|
|
|
case WALL_XREPEAT:
|
|
|
|
return wall[iWall].xrepeat;
|
|
|
|
case WALL_YREPEAT:
|
|
|
|
return wall[iWall].yrepeat;
|
|
|
|
case WALL_XPANNING:
|
|
|
|
return wall[iWall].xpanning;
|
|
|
|
case WALL_YPANNING:
|
|
|
|
return wall[iWall].ypanning;
|
|
|
|
case WALL_LOTAG:
|
|
|
|
return wall[iWall].lotag;
|
|
|
|
case WALL_HITAG:
|
|
|
|
return wall[iWall].hitag;
|
|
|
|
case WALL_EXTRA:
|
|
|
|
return wall[iWall].extra;
|
|
|
|
default:
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif // _gamevars_c_
|