Select Git revision
lua_mobjlib.c 26.51 KiB
// SONIC ROBO BLAST 2
//-----------------------------------------------------------------------------
// Copyright (C) 2012-2016 by John "JTE" Muniz.
// Copyright (C) 2012-2023 by Sonic Team Junior.
//
// This program is free software distributed under the
// terms of the GNU General Public License, version 2.
// See the 'LICENSE' file for more details.
//-----------------------------------------------------------------------------
/// \file lua_mobjlib.c
/// \brief mobj/thing library for Lua scripting
#include "doomdef.h"
#include "fastcmp.h"
#include "r_data.h"
#include "r_skins.h"
#include "p_local.h"
#include "g_game.h"
#include "p_setup.h"
#include "lua_script.h"
#include "lua_libs.h"
#include "lua_hud.h" // hud_running errors
#include "lua_hook.h" // hook_cmd_running errors
enum mobj_e {
mobj_valid = 0,
mobj_x,
mobj_y,
mobj_z,
mobj_snext,
mobj_sprev,
mobj_angle,
mobj_pitch,
mobj_roll,
mobj_rollangle,
mobj_sprite,
mobj_frame,
mobj_sprite2,
mobj_anim_duration,
mobj_spritexscale,
mobj_spriteyscale,
mobj_spritexoffset,
mobj_spriteyoffset,
mobj_floorspriteslope,
mobj_touching_sectorlist,
mobj_subsector,
mobj_floorz,
mobj_ceilingz,
mobj_floorrover,
mobj_ceilingrover,
mobj_radius,
mobj_height,
mobj_momx,
mobj_momy,
mobj_momz,
mobj_pmomz,
mobj_tics,
mobj_state,
mobj_flags,
mobj_flags2,
mobj_eflags,
mobj_renderflags,
mobj_skin,
mobj_color,
mobj_blendmode,
mobj_bnext,
mobj_bprev,
mobj_hnext,
mobj_hprev,