mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-21 03:11:57 +00:00
Temporary build xatrix as separate library
This commit is contained in:
parent
dd51307b34
commit
7f74db318b
96 changed files with 547 additions and 4945 deletions
120
Makefile
120
Makefile
|
@ -377,12 +377,12 @@ endif
|
|||
# ----------
|
||||
|
||||
# Phony targets
|
||||
.PHONY : all client game icon server ref_gl1 ref_gl3 ref_gles3 ref_soft ref_vk ref_gl4
|
||||
.PHONY : all client game icon server ref_gl1 ref_gl3 ref_gles3 ref_soft ref_vk ref_gl4 xatrix
|
||||
|
||||
# ----------
|
||||
|
||||
# Builds everything
|
||||
all: config client server game ref_gl1 ref_gl3 ref_gles3 ref_soft ref_vk ref_gl4
|
||||
all: config client server game ref_gl1 ref_gl3 ref_gles3 ref_soft ref_vk ref_gl4 xatrix
|
||||
|
||||
# ----------
|
||||
|
||||
|
@ -1413,3 +1413,119 @@ release/baseq2/game.so : $(GAME_OBJS)
|
|||
endif
|
||||
|
||||
# ----------
|
||||
|
||||
# The xatrix game
|
||||
ifeq ($(YQ2_OSTYPE), Windows)
|
||||
xatrix:
|
||||
@echo "===> Building xatrix/game.dll"
|
||||
${Q}mkdir -p release/xatrix
|
||||
${MAKE} release/xatrix/game.dll
|
||||
else ifeq ($(YQ2_OSTYPE), Darwin)
|
||||
xatrix:
|
||||
@echo "===> Building xatrix/game.dylib"
|
||||
${Q}mkdir -p release/xatrix
|
||||
$(MAKE) release/xatrix/game.dylib
|
||||
else
|
||||
xatrix:
|
||||
@echo "===> Building xatrix/game.so"
|
||||
${Q}mkdir -p release/xatrix
|
||||
$(MAKE) release/xatrix/game.so
|
||||
|
||||
release/xatrix/game.so : CFLAGS += -fPIC -Wno-unused-result
|
||||
release/xatrix/game.so : LDFLAGS += -shared
|
||||
|
||||
endif
|
||||
|
||||
build/xatrix/%.o: %.c
|
||||
@echo "===> CC $<"
|
||||
${Q}mkdir -p $(@D)
|
||||
${Q}$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
# ----------
|
||||
|
||||
XATRIX_OBJS_ = \
|
||||
src/common/shared/flash.o \
|
||||
src/common/shared/rand.o \
|
||||
src/common/shared/shared.o \
|
||||
src/xatrix/g_ai.o \
|
||||
src/xatrix/g_chase.o \
|
||||
src/xatrix/g_cmds.o \
|
||||
src/xatrix/g_combat.o \
|
||||
src/xatrix/g_func.o \
|
||||
src/xatrix/g_items.o \
|
||||
src/xatrix/g_main.o \
|
||||
src/xatrix/g_misc.o \
|
||||
src/xatrix/g_monster.o \
|
||||
src/xatrix/g_phys.o \
|
||||
src/xatrix/g_spawn.o \
|
||||
src/xatrix/g_svcmds.o \
|
||||
src/xatrix/g_target.o \
|
||||
src/xatrix/g_trigger.o \
|
||||
src/xatrix/g_turret.o \
|
||||
src/xatrix/g_utils.o \
|
||||
src/xatrix/g_weapon.o \
|
||||
src/xatrix/monster/berserker/berserker.o \
|
||||
src/xatrix/monster/boss2/boss2.o \
|
||||
src/xatrix/monster/boss3/boss3.o \
|
||||
src/xatrix/monster/boss3/boss31.o \
|
||||
src/xatrix/monster/boss3/boss32.o \
|
||||
src/xatrix/monster/boss5/boss5.o \
|
||||
src/xatrix/monster/brain/brain.o \
|
||||
src/xatrix/monster/chick/chick.o \
|
||||
src/xatrix/monster/fixbot/fixbot.o \
|
||||
src/xatrix/monster/flipper/flipper.o \
|
||||
src/xatrix/monster/float/float.o \
|
||||
src/xatrix/monster/flyer/flyer.o \
|
||||
src/xatrix/monster/gekk/gekk.o \
|
||||
src/xatrix/monster/gladiator/gladb.o \
|
||||
src/xatrix/monster/gladiator/gladiator.o \
|
||||
src/xatrix/monster/gunner/gunner.o \
|
||||
src/xatrix/monster/hover/hover.o \
|
||||
src/xatrix/monster/infantry/infantry.o \
|
||||
src/xatrix/monster/insane/insane.o \
|
||||
src/xatrix/monster/medic/medic.o \
|
||||
src/xatrix/monster/misc/move.o \
|
||||
src/xatrix/monster/mutant/mutant.o \
|
||||
src/xatrix/monster/parasite/parasite.o \
|
||||
src/xatrix/monster/soldier/soldier.o \
|
||||
src/xatrix/monster/supertank/supertank.o \
|
||||
src/xatrix/monster/tank/tank.o \
|
||||
src/xatrix/player/client.o \
|
||||
src/xatrix/player/hud.o \
|
||||
src/xatrix/player/trail.o \
|
||||
src/xatrix/player/view.o \
|
||||
src/xatrix/player/weapon.o \
|
||||
src/xatrix/savegame/savegame.o
|
||||
|
||||
# ----------
|
||||
|
||||
# Rewrite paths to our object directory
|
||||
XATRIX_OBJS = $(patsubst %,build/xatrix/%,$(XATRIX_OBJS_))
|
||||
|
||||
# ----------
|
||||
|
||||
# Generate header dependencies
|
||||
XATRIX_DEPS= $(XATRIX_OBJS:.o=.d)
|
||||
|
||||
# ----------
|
||||
|
||||
# Suck header dependencies in
|
||||
-include $(XATRIX_DEPS)
|
||||
|
||||
# ----------
|
||||
|
||||
ifeq ($(YQ2_OSTYPE), Windows)
|
||||
release/xatrix/game.dll : $(XATRIX_OBJS)
|
||||
@echo "===> LD $@"
|
||||
${Q}$(CC) $(LDFLAGS) $(XATRIX_OBJS) $(LDLIBS) -o $@
|
||||
else ifeq ($(YQ2_OSTYPE), Darwin)
|
||||
release/xatrix/game.dylib : $(XATRIX_OBJS)
|
||||
@echo "===> LD $@"
|
||||
${Q}$(CC) $(LDFLAGS) $(XATRIX_OBJS) $(LDLIBS) -o $@
|
||||
else
|
||||
release/xatrix/game.so : $(XATRIX_OBJS)
|
||||
@echo "===> LD $@"
|
||||
${Q}$(CC) $(LDFLAGS) $(XATRIX_OBJS) $(LDLIBS) -o $@
|
||||
endif
|
||||
|
||||
# ----------
|
||||
|
|
|
@ -1,246 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 1997-2001 Id Software, Inc.
|
||||
* Copyright (c) ZeniMax Media Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* =======================================================================
|
||||
*
|
||||
* Here are the client, server and game are tied together.
|
||||
*
|
||||
* =======================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
*
|
||||
* THIS FILE IS _VERY_ FRAGILE AND THERE'S NOTHING IN IT THAT CAN OR
|
||||
* MUST BE CHANGED. IT'S MOST LIKELY A VERY GOOD IDEA TO CLOSE THE
|
||||
* EDITOR NOW AND NEVER LOOK BACK. OTHERWISE YOU MAY SCREW UP EVERYTHING!
|
||||
*
|
||||
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
*/
|
||||
|
||||
#ifndef XATRIX_GAME_H
|
||||
#define XATRIX_GAME_H
|
||||
|
||||
#define GAME_API_VERSION 3
|
||||
|
||||
#define SVF_NOCLIENT 0x00000001 /* don't send entity to clients, even if it has effects */
|
||||
#define SVF_DEADMONSTER 0x00000002 /* treat as CONTENTS_DEADMONSTER for collision */
|
||||
#define SVF_MONSTER 0x00000004 /* treat as CONTENTS_MONSTER for collision */
|
||||
#define SVF_DAMAGEABLE 0x00000008
|
||||
|
||||
#define MAX_ENT_CLUSTERS 16
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SOLID_NOT, /* no interaction with other objects */
|
||||
SOLID_TRIGGER, /* only touch when inside, after moving */
|
||||
SOLID_BBOX, /* touch on edge */
|
||||
SOLID_BSP /* bsp clip, touch on edge */
|
||||
} solid_t;
|
||||
|
||||
/* =============================================================== */
|
||||
|
||||
/* link_t is only used for entity area links now */
|
||||
typedef struct link_s
|
||||
{
|
||||
struct link_s *prev, *next;
|
||||
} link_t;
|
||||
|
||||
|
||||
typedef struct edict_s edict_t;
|
||||
typedef struct gclient_s gclient_t;
|
||||
|
||||
#ifndef GAME_INCLUDE
|
||||
|
||||
struct gclient_s
|
||||
{
|
||||
player_state_t ps; /* communicated by server to clients */
|
||||
int ping;
|
||||
/* the game dll can add anything it wants
|
||||
after this point in the structure */
|
||||
};
|
||||
|
||||
struct edict_s
|
||||
{
|
||||
entity_state_t s;
|
||||
struct gclient_s *client;
|
||||
qboolean inuse;
|
||||
int linkcount;
|
||||
|
||||
link_t area; /* linked to a division node or leaf */
|
||||
|
||||
int num_clusters; /* if -1, use headnode instead */
|
||||
int clusternums[MAX_ENT_CLUSTERS];
|
||||
int headnode; /* unused if num_clusters != -1 */
|
||||
int areanum, areanum2;
|
||||
|
||||
/* ================================ */
|
||||
|
||||
int svflags; /* SVF_NOCLIENT, SVF_DEADMONSTER, SVF_MONSTER, etc */
|
||||
vec3_t mins, maxs;
|
||||
vec3_t absmin, absmax, size;
|
||||
solid_t solid;
|
||||
int clipmask;
|
||||
edict_t *owner;
|
||||
|
||||
/* the game dll can add anything it wants
|
||||
after this point in the structure */
|
||||
};
|
||||
|
||||
#endif /* GAME_INCLUDE */
|
||||
|
||||
/* =============================================================== */
|
||||
|
||||
/* functions provided by the main engine */
|
||||
typedef struct
|
||||
{
|
||||
/* special messages */
|
||||
void (*bprintf)(int printlevel, const char *fmt, ...);
|
||||
void (*dprintf)(const char *fmt, ...);
|
||||
void (*cprintf)(edict_t *ent, int printlevel, const char *fmt, ...);
|
||||
void (*centerprintf)(edict_t *ent, const char *fmt, ...);
|
||||
void (*sound)(edict_t *ent, int channel, int soundindex, float volume,
|
||||
float attenuation, float timeofs);
|
||||
void (*positioned_sound)(vec3_t origin, edict_t *ent, int channel,
|
||||
int soundinedex, float volume, float attenuation, float timeofs);
|
||||
|
||||
/* config strings hold all the index strings, the lightstyles,
|
||||
and misc data like the sky definition and cdtrack.
|
||||
All of the current configstrings are sent to clients when
|
||||
they connect, and changes are sent to all connected clients. */
|
||||
void (*configstring)(int num, const char *string);
|
||||
|
||||
YQ2_ATTR_NORETURN_FUNCPTR void (*error)(const char *fmt, ...);
|
||||
|
||||
/* the *index functions create configstrings
|
||||
and some internal server state */
|
||||
int (*modelindex)(const char *name);
|
||||
int (*soundindex)(const char *name);
|
||||
int (*imageindex)(const char *name);
|
||||
|
||||
void (*setmodel)(edict_t *ent, const char *name);
|
||||
|
||||
/* collision detection */
|
||||
trace_t (*trace)(vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end,
|
||||
edict_t *passent, int contentmask);
|
||||
int (*pointcontents)(vec3_t point);
|
||||
qboolean (*inPVS)(vec3_t p1, vec3_t p2);
|
||||
qboolean (*inPHS)(vec3_t p1, vec3_t p2);
|
||||
void (*SetAreaPortalState)(int portalnum, qboolean open);
|
||||
qboolean (*AreasConnected)(int area1, int area2);
|
||||
|
||||
/* an entity will never be sent to a client or used for collision
|
||||
if it is not passed to linkentity. If the size, position, or
|
||||
solidity changes, it must be relinked. */
|
||||
void (*linkentity)(edict_t *ent);
|
||||
void (*unlinkentity)(edict_t *ent); /* call before removing an interactive edict */
|
||||
int (*BoxEdicts)(vec3_t mins, vec3_t maxs, edict_t **list, int maxcount,
|
||||
int areatype);
|
||||
void (*Pmove)(pmove_t *pmove); /* player movement code common with client prediction */
|
||||
|
||||
/* network messaging */
|
||||
void (*multicast)(vec3_t origin, multicast_t to);
|
||||
void (*unicast)(edict_t *ent, qboolean reliable);
|
||||
void (*WriteChar)(int c);
|
||||
void (*WriteByte)(int c);
|
||||
void (*WriteShort)(int c);
|
||||
void (*WriteLong)(int c);
|
||||
void (*WriteFloat)(float f);
|
||||
void (*WriteString)(const char *s);
|
||||
void (*WritePosition)(vec3_t pos); /* some fractional bits */
|
||||
void (*WriteDir)(vec3_t pos); /* single byte encoded, very coarse */
|
||||
void (*WriteAngle)(float f);
|
||||
|
||||
/* managed memory allocation */
|
||||
void *(*TagMalloc)(int size, int tag);
|
||||
void (*TagFree)(void *block);
|
||||
void (*FreeTags)(int tag);
|
||||
|
||||
/* console variable interaction */
|
||||
cvar_t *(*cvar)(const char *var_name, const char *value, int flags);
|
||||
cvar_t *(*cvar_set)(const char *var_name, const char *value);
|
||||
cvar_t *(*cvar_forceset)(const char *var_name, const char *value);
|
||||
|
||||
/* ClientCommand and ServerCommand parameter access */
|
||||
int (*argc)(void);
|
||||
char *(*argv)(int n);
|
||||
char *(*args)(void); /* concatenation of all argv >= 1 */
|
||||
|
||||
/* add commands to the server console as if
|
||||
they were typed in for map changing, etc */
|
||||
void (*AddCommandString)(const char *text);
|
||||
|
||||
void (*DebugGraph)(float value, int color);
|
||||
} game_import_t;
|
||||
|
||||
/* functions exported by the game subsystem */
|
||||
typedef struct
|
||||
{
|
||||
int apiversion;
|
||||
|
||||
/* the init function will only be called when a game starts,
|
||||
not each time a level is loaded. Persistant data for clients
|
||||
and the server can be allocated in init */
|
||||
void (*Init)(void);
|
||||
void (*Shutdown)(void);
|
||||
|
||||
/* each new level entered will cause a call to SpawnEntities */
|
||||
void (*SpawnEntities)(const char *mapname, char *entstring, const char *spawnpoint);
|
||||
|
||||
/* Read/Write Game is for storing persistant cross level information
|
||||
about the world state and the clients.
|
||||
WriteGame is called every time a level is exited.
|
||||
ReadGame is called on a loadgame. */
|
||||
void (*WriteGame)(const char *filename, qboolean autosave);
|
||||
void (*ReadGame)(const char *filename);
|
||||
|
||||
/* ReadLevel is called after the default
|
||||
map information has been loaded with
|
||||
SpawnEntities */
|
||||
void (*WriteLevel)(const char *filename);
|
||||
void (*ReadLevel)(const char *filename);
|
||||
|
||||
qboolean (*ClientConnect)(edict_t *ent, char *userinfo);
|
||||
void (*ClientBegin)(edict_t *ent);
|
||||
void (*ClientUserinfoChanged)(edict_t *ent, char *userinfo);
|
||||
void (*ClientDisconnect)(edict_t *ent);
|
||||
void (*ClientCommand)(edict_t *ent);
|
||||
void (*ClientThink)(edict_t *ent, usercmd_t *cmd);
|
||||
|
||||
void (*RunFrame)(void);
|
||||
|
||||
/* ServerCommand will be called when an "sv <command>"
|
||||
command is issued on the server console. The game can
|
||||
issue gi.argc() / gi.argv() commands to get the rest
|
||||
of the parameters */
|
||||
void (*ServerCommand)(void);
|
||||
|
||||
/* global variables shared between game and server */
|
||||
|
||||
/* The edict array is allocated in the game dll so it
|
||||
can vary in size from one game to another.
|
||||
The size will be fixed when ge->Init() is called */
|
||||
struct edict_s *edicts;
|
||||
int edict_size;
|
||||
int num_edicts; /* current number, <= max_edicts */
|
||||
int max_edicts;
|
||||
} game_export_t;
|
||||
|
||||
#endif /* XATRIX_GAME_H */
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,467 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) ZeniMax Media Inc.
|
||||
* Licensed under the GNU General Public License 2.0.
|
||||
*/
|
||||
|
||||
/*
|
||||
* =======================================================================
|
||||
*
|
||||
* Muzzle flash posititions.
|
||||
*
|
||||
* =======================================================================
|
||||
*/
|
||||
|
||||
#include "../header/shared.h"
|
||||
|
||||
vec3_t monster_flash_offset[] = {
|
||||
/* flash 0 is not used */
|
||||
{0.0, 0.0, 0.0},
|
||||
|
||||
/* MZ2_TANK_BLASTER_1 1 */
|
||||
{20.7, -18.5, 28.7},
|
||||
/* MZ2_TANK_BLASTER_2 2 */
|
||||
{16.6, -21.5, 30.1},
|
||||
/* MZ2_TANK_BLASTER_3 3 */
|
||||
{11.8, -23.9, 32.1},
|
||||
/* MZ2_TANK_MACHINEGUN_1 4 */
|
||||
{22.9, -0.7, 25.3},
|
||||
/* MZ2_TANK_MACHINEGUN_2 5 */
|
||||
{22.2, 6.2, 22.3},
|
||||
/* MZ2_TANK_MACHINEGUN_3 6 */
|
||||
{19.4, 13.1, 18.6},
|
||||
/* MZ2_TANK_MACHINEGUN_4 7 */
|
||||
{19.4, 18.8, 18.6},
|
||||
/* MZ2_TANK_MACHINEGUN_5 8 */
|
||||
{17.9, 25.0, 18.6},
|
||||
/* MZ2_TANK_MACHINEGUN_6 9 */
|
||||
{14.1, 30.5, 20.6},
|
||||
/* MZ2_TANK_MACHINEGUN_7 10 */
|
||||
{9.3, 35.3, 22.1},
|
||||
/* MZ2_TANK_MACHINEGUN_8 11 */
|
||||
{4.7, 38.4, 22.1},
|
||||
/* MZ2_TANK_MACHINEGUN_9 12 */
|
||||
{-1.1, 40.4, 24.1},
|
||||
/* MZ2_TANK_MACHINEGUN_10 13 */
|
||||
{-6.5, 41.2, 24.1},
|
||||
/* MZ2_TANK_MACHINEGUN_11 14 */
|
||||
{3.2, 40.1, 24.7},
|
||||
/* MZ2_TANK_MACHINEGUN_12 15 */
|
||||
{11.7, 36.7, 26.0},
|
||||
/* MZ2_TANK_MACHINEGUN_13 16 */
|
||||
{18.9, 31.3, 26.0},
|
||||
/* MZ2_TANK_MACHINEGUN_14 17 */
|
||||
{24.4, 24.4, 26.4},
|
||||
/* MZ2_TANK_MACHINEGUN_15 18 */
|
||||
{27.1, 17.1, 27.2},
|
||||
/* MZ2_TANK_MACHINEGUN_16 19 */
|
||||
{28.5, 9.1, 28.0},
|
||||
/* MZ2_TANK_MACHINEGUN_17 20 */
|
||||
{27.1, 2.2, 28.0},
|
||||
/* MZ2_TANK_MACHINEGUN_18 21 */
|
||||
{24.9, -2.8, 28.0},
|
||||
/* MZ2_TANK_MACHINEGUN_19 22 */
|
||||
{21.6, -7.0, 26.4},
|
||||
/* MZ2_TANK_ROCKET_1 23 */
|
||||
{6.2, 29.1, 49.1},
|
||||
/* MZ2_TANK_ROCKET_2 24 */
|
||||
{6.9, 23.8, 49.1},
|
||||
/* MZ2_TANK_ROCKET_3 25 */
|
||||
{8.3, 17.8, 49.5},
|
||||
|
||||
/* MZ2_INFANTRY_MACHINEGUN_1 26 */
|
||||
{26.6, 7.1, 13.1},
|
||||
/* MZ2_INFANTRY_MACHINEGUN_2 27 */
|
||||
{18.2, 7.5, 15.4},
|
||||
/* MZ2_INFANTRY_MACHINEGUN_3 28 */
|
||||
{17.2, 10.3, 17.9},
|
||||
/* MZ2_INFANTRY_MACHINEGUN_4 29 */
|
||||
{17.0, 12.8, 20.1},
|
||||
/* MZ2_INFANTRY_MACHINEGUN_5 30 */
|
||||
{15.1, 14.1, 21.8},
|
||||
/* MZ2_INFANTRY_MACHINEGUN_6 31 */
|
||||
{11.8, 17.2, 23.1},
|
||||
/* MZ2_INFANTRY_MACHINEGUN_7 32 */
|
||||
{11.4, 20.2, 21.0},
|
||||
/* MZ2_INFANTRY_MACHINEGUN_8 33 */
|
||||
{9.0, 23.0, 18.9},
|
||||
/* MZ2_INFANTRY_MACHINEGUN_9 34 */
|
||||
{13.9, 18.6, 17.7},
|
||||
/* MZ2_INFANTRY_MACHINEGUN_10 35 */
|
||||
{15.4, 15.6, 15.8},
|
||||
/* MZ2_INFANTRY_MACHINEGUN_11 36 */
|
||||
{10.2, 15.2, 25.1},
|
||||
/* MZ2_INFANTRY_MACHINEGUN_12 37 */
|
||||
{-1.9, 15.1, 28.2},
|
||||
/* MZ2_INFANTRY_MACHINEGUN_13 38 */
|
||||
{-12.4, 13.0, 20.2},
|
||||
|
||||
/* MZ2_SOLDIER_BLASTER_1 39 */
|
||||
{10.6 * 1.2, 7.7 * 1.2, 7.8 * 1.2},
|
||||
/* MZ2_SOLDIER_BLASTER_2 40 */
|
||||
{21.1 * 1.2, 3.6 * 1.2, 19.0 * 1.2},
|
||||
/* MZ2_SOLDIER_SHOTGUN_1 41 */
|
||||
{10.6 * 1.2, 7.7 * 1.2, 7.8 * 1.2},
|
||||
/* MZ2_SOLDIER_SHOTGUN_2 42 */
|
||||
{21.1 * 1.2, 3.6 * 1.2, 19.0 * 1.2},
|
||||
/* MZ2_SOLDIER_MACHINEGUN_1 43 */
|
||||
{10.6 * 1.2, 7.7 * 1.2, 7.8 * 1.2},
|
||||
/* MZ2_SOLDIER_MACHINEGUN_2 44 */
|
||||
{21.1 * 1.2, 3.6 * 1.2, 19.0 * 1.2},
|
||||
|
||||
/* MZ2_GUNNER_MACHINEGUN_1 45 */
|
||||
{30.1 * 1.15, 3.9 * 1.15, 19.6 * 1.15},
|
||||
/* MZ2_GUNNER_MACHINEGUN_2 46 */
|
||||
{29.1 * 1.15, 2.5 * 1.15, 20.7 * 1.15},
|
||||
/* MZ2_GUNNER_MACHINEGUN_3 47 */
|
||||
{28.2 * 1.15, 2.5 * 1.15, 22.2 * 1.15},
|
||||
/* MZ2_GUNNER_MACHINEGUN_4 48 */
|
||||
{28.2 * 1.15, 3.6 * 1.15, 22.0 * 1.15},
|
||||
/* MZ2_GUNNER_MACHINEGUN_5 49 */
|
||||
{26.9 * 1.15, 2.0 * 1.15, 23.4 * 1.15},
|
||||
/* MZ2_GUNNER_MACHINEGUN_6 50 */
|
||||
{26.5 * 1.15, 0.6 * 1.15, 20.8 * 1.15},
|
||||
/* MZ2_GUNNER_MACHINEGUN_7 51 */
|
||||
{26.9 * 1.15, 0.5 * 1.15, 21.5 * 1.15},
|
||||
/* MZ2_GUNNER_MACHINEGUN_8 52 */
|
||||
{29.0 * 1.15, 2.4 * 1.15, 19.5 * 1.15},
|
||||
/* MZ2_GUNNER_GRENADE_1 53 */
|
||||
{4.6 * 1.15, -16.8 * 1.15, 7.3 * 1.15},
|
||||
/* MZ2_GUNNER_GRENADE_2 54 */
|
||||
{4.6 * 1.15, -16.8 * 1.15, 7.3 * 1.15},
|
||||
/* MZ2_GUNNER_GRENADE_3 55 */
|
||||
{4.6 * 1.15, -16.8 * 1.15, 7.3 * 1.15},
|
||||
/* MZ2_GUNNER_GRENADE_4 56 */
|
||||
{4.6 * 1.15, -16.8 * 1.15, 7.3 * 1.15},
|
||||
|
||||
/* MZ2_CHICK_ROCKET_1 57 */
|
||||
{24.8, -9.0, 39.0},
|
||||
|
||||
/* MZ2_FLYER_BLASTER_1 58 */
|
||||
{12.1, 13.4, -14.5},
|
||||
/* MZ2_FLYER_BLASTER_2 59 */
|
||||
{12.1, -7.4, -14.5},
|
||||
|
||||
/* MZ2_MEDIC_BLASTER_1 60 */
|
||||
{12.1, 5.4, 16.5},
|
||||
|
||||
/* MZ2_GLADIATOR_RAILGUN_1 61 */
|
||||
{30.0, 18.0, 28.0},
|
||||
|
||||
/* MZ2_HOVER_BLASTER_1 62 */
|
||||
{32.5, -0.8, 10.0},
|
||||
|
||||
/* MZ2_ACTOR_MACHINEGUN_1 63 */
|
||||
{18.4, 7.4, 9.6},
|
||||
|
||||
/* MZ2_SUPERTANK_MACHINEGUN_1 64 */
|
||||
{30.0, 30.0, 88.5},
|
||||
/* MZ2_SUPERTANK_MACHINEGUN_2 65 */
|
||||
{30.0, 30.0, 88.5},
|
||||
/* MZ2_SUPERTANK_MACHINEGUN_3 66 */
|
||||
{30.0, 30.0, 88.5},
|
||||
/* MZ2_SUPERTANK_MACHINEGUN_4 67 */
|
||||
{30.0, 30.0, 88.5},
|
||||
/* MZ2_SUPERTANK_MACHINEGUN_5 68 */
|
||||
{30.0, 30.0, 88.5},
|
||||
/* MZ2_SUPERTANK_MACHINEGUN_6 69 */
|
||||
{30.0, 30.0, 88.5},
|
||||
/* MZ2_SUPERTANK_ROCKET_1 70 */
|
||||
{16.0, -22.5, 91.2},
|
||||
/* MZ2_SUPERTANK_ROCKET_2 71 */
|
||||
{16.0, -33.4, 86.7},
|
||||
/* MZ2_SUPERTANK_ROCKET_3 72 */
|
||||
{16.0, -42.8, 83.3},
|
||||
|
||||
/* MZ2_BOSS2_MACHINEGUN_L1 73 */
|
||||
{32, -40, 70},
|
||||
/* MZ2_BOSS2_MACHINEGUN_L2 74 */
|
||||
{32, -40, 70},
|
||||
/* MZ2_BOSS2_MACHINEGUN_L3 75 */
|
||||
{32, -40, 70},
|
||||
/* MZ2_BOSS2_MACHINEGUN_L4 76 */
|
||||
{32, -40, 70},
|
||||
/* MZ2_BOSS2_MACHINEGUN_L5 77 */
|
||||
{32, -40, 70},
|
||||
|
||||
/* MZ2_BOSS2_ROCKET_1 78 */
|
||||
{22.0, 16.0, 10.0},
|
||||
/* MZ2_BOSS2_ROCKET_2 79 */
|
||||
{22.0, 8.0, 10.0},
|
||||
/* MZ2_BOSS2_ROCKET_3 80 */
|
||||
{22.0, -8.0, 10.0},
|
||||
/* MZ2_BOSS2_ROCKET_4 81 */
|
||||
{22.0, -16.0, 10.0},
|
||||
|
||||
/* MZ2_FLOAT_BLASTER_1 82 */
|
||||
{32.5, -0.8, 10},
|
||||
|
||||
/* MZ2_SOLDIER_BLASTER_3 83 */
|
||||
{20.8 * 1.2, 10.1 * 1.2, -2.7 * 1.2},
|
||||
/* MZ2_SOLDIER_SHOTGUN_3 84 */
|
||||
{20.8 * 1.2, 10.1 * 1.2, -2.7 * 1.2},
|
||||
/* MZ2_SOLDIER_MACHINEGUN_3 85 */
|
||||
{20.8 * 1.2, 10.1 * 1.2, -2.7 * 1.2},
|
||||
/* MZ2_SOLDIER_BLASTER_4 86 */
|
||||
{7.6 * 1.2, 9.3 * 1.2, 0.8 * 1.2},
|
||||
/* MZ2_SOLDIER_SHOTGUN_4 87 */
|
||||
{7.6 * 1.2, 9.3 * 1.2, 0.8 * 1.2},
|
||||
/* MZ2_SOLDIER_MACHINEGUN_4 88 */
|
||||
{7.6 * 1.2, 9.3 * 1.2, 0.8 * 1.2},
|
||||
/* MZ2_SOLDIER_BLASTER_5 89 */
|
||||
{30.5 * 1.2, 9.9 * 1.2, -18.7 * 1.2},
|
||||
/* MZ2_SOLDIER_SHOTGUN_5 90 */
|
||||
{30.5 * 1.2, 9.9 * 1.2, -18.7 * 1.2},
|
||||
/* MZ2_SOLDIER_MACHINEGUN_5 91 */
|
||||
{30.5 * 1.2, 9.9 * 1.2, -18.7 * 1.2},
|
||||
/* MZ2_SOLDIER_BLASTER_6 92 */
|
||||
{27.6 * 1.2, 3.4 * 1.2, -10.4 * 1.2},
|
||||
/* MZ2_SOLDIER_SHOTGUN_6 93 */
|
||||
{27.6 * 1.2, 3.4 * 1.2, -10.4 * 1.2},
|
||||
/* MZ2_SOLDIER_MACHINEGUN_6 94 */
|
||||
{27.6 * 1.2, 3.4 * 1.2, -10.4 * 1.2},
|
||||
/* MZ2_SOLDIER_BLASTER_7 95 */
|
||||
{28.9 * 1.2, 4.6 * 1.2, -8.1 * 1.2},
|
||||
/* MZ2_SOLDIER_SHOTGUN_7 96 */
|
||||
{28.9 * 1.2, 4.6 * 1.2, -8.1 * 1.2},
|
||||
/* MZ2_SOLDIER_MACHINEGUN_7 97 */
|
||||
{28.9 * 1.2, 4.6 * 1.2, -8.1 * 1.2},
|
||||
/* MZ2_SOLDIER_BLASTER_8 98 */
|
||||
{31.5 * 1.2, 9.6 * 1.2, 10.1 * 1.2},
|
||||
/* MZ2_SOLDIER_SHOTGUN_8 99 */
|
||||
{34.5 * 1.2, 9.6 * 1.2, 6.1 * 1.2},
|
||||
/* MZ2_SOLDIER_MACHINEGUN_8 100 */
|
||||
{34.5 * 1.2, 9.6 * 1.2, 6.1 * 1.2},
|
||||
|
||||
/* MZ2_MAKRON_BFG 101 */
|
||||
{17, -19.5, 62.9},
|
||||
/* MZ2_MAKRON_BLASTER_1 102 */
|
||||
{-3.6, -24.1, 59.5},
|
||||
/* MZ2_MAKRON_BLASTER_2 103 */
|
||||
{-1.6, -19.3, 59.5},
|
||||
/* MZ2_MAKRON_BLASTER_3 104 */
|
||||
{-0.1, -14.4, 59.5},
|
||||
/* MZ2_MAKRON_BLASTER_4 105 */
|
||||
{2.0, -7.6, 59.5},
|
||||
/* MZ2_MAKRON_BLASTER_5 106 */
|
||||
{3.4, 1.3, 59.5},
|
||||
/* MZ2_MAKRON_BLASTER_6 107 */
|
||||
{3.7, 11.1, 59.5},
|
||||
/* MZ2_MAKRON_BLASTER_7 108 */
|
||||
{-0.3, 22.3, 59.5},
|
||||
/* MZ2_MAKRON_BLASTER_8 109 */
|
||||
{-6, 33, 59.5},
|
||||
/* MZ2_MAKRON_BLASTER_9 110 */
|
||||
{-9.3, 36.4, 59.5},
|
||||
/* MZ2_MAKRON_BLASTER_10 111 */
|
||||
{-7, 35, 59.5},
|
||||
/* MZ2_MAKRON_BLASTER_11 112 */
|
||||
{-2.1, 29, 59.5},
|
||||
/* MZ2_MAKRON_BLASTER_12 113 */
|
||||
{3.9, 17.3, 59.5},
|
||||
/* MZ2_MAKRON_BLASTER_13 114 */
|
||||
{6.1, 5.8, 59.5},
|
||||
/* MZ2_MAKRON_BLASTER_14 115 */
|
||||
{5.9, -4.4, 59.5},
|
||||
/* MZ2_MAKRON_BLASTER_15 116 */
|
||||
{4.2, -14.1, 59.5},
|
||||
/* MZ2_MAKRON_BLASTER_16 117 */
|
||||
{2.4, -18.8, 59.5},
|
||||
/* MZ2_MAKRON_BLASTER_17 118 */
|
||||
{-1.8, -25.5, 59.5},
|
||||
/* MZ2_MAKRON_RAILGUN_1 119 */
|
||||
{-17.3, 7.8, 72.4},
|
||||
|
||||
/* MZ2_JORG_MACHINEGUN_L1 120 */
|
||||
{78.5, -47.1, 96},
|
||||
/* MZ2_JORG_MACHINEGUN_L2 121 */
|
||||
{78.5, -47.1, 96},
|
||||
/* MZ2_JORG_MACHINEGUN_L3 122 */
|
||||
{78.5, -47.1, 96},
|
||||
/* MZ2_JORG_MACHINEGUN_L4 123 */
|
||||
{78.5, -47.1, 96},
|
||||
/* MZ2_JORG_MACHINEGUN_L5 124 */
|
||||
{78.5, -47.1, 96},
|
||||
/* MZ2_JORG_MACHINEGUN_L6 125 */
|
||||
{78.5, -47.1, 96},
|
||||
/* MZ2_JORG_MACHINEGUN_R1 126 */
|
||||
{78.5, 46.7, 96},
|
||||
/* MZ2_JORG_MACHINEGUN_R2 127 */
|
||||
{78.5, 46.7, 96},
|
||||
/* MZ2_JORG_MACHINEGUN_R3 128 */
|
||||
{78.5, 46.7, 96},
|
||||
/* MZ2_JORG_MACHINEGUN_R4 129 */
|
||||
{78.5, 46.7, 96},
|
||||
/* MZ2_JORG_MACHINEGUN_R5 130 */
|
||||
{78.5, 46.7, 96},
|
||||
/* MZ2_JORG_MACHINEGUN_R6 131 */
|
||||
{78.5, 46.7, 96},
|
||||
/* MZ2_JORG_BFG_1 132 */
|
||||
{6.3, -9, 111.2},
|
||||
|
||||
/* MZ2_BOSS2_MACHINEGUN_R1 73 */
|
||||
{32, 40, 70},
|
||||
/* MZ2_BOSS2_MACHINEGUN_R2 74 */
|
||||
{32, 40, 70},
|
||||
/* MZ2_BOSS2_MACHINEGUN_R3 75 */
|
||||
{32, 40, 70},
|
||||
/* MZ2_BOSS2_MACHINEGUN_R4 76 */
|
||||
{32, 40, 70},
|
||||
/* MZ2_BOSS2_MACHINEGUN_R5 77 */
|
||||
{32, 40, 70},
|
||||
|
||||
|
||||
/* MZ2_CARRIER_MACHINEGUN_L1 */
|
||||
{56, -32, 32},
|
||||
/* MZ2_CARRIER_MACHINEGUN_R1 */
|
||||
{56, 32, 32},
|
||||
/* MZ2_CARRIER_GRENADE */
|
||||
{42, 24, 50},
|
||||
/* MZ2_TURRET_MACHINEGUN 141 */
|
||||
{16, 0, 0},
|
||||
/* MZ2_TURRET_ROCKET 142 */
|
||||
{16, 0, 0},
|
||||
/* MZ2_TURRET_BLASTER 143 */
|
||||
{16, 0, 0},
|
||||
/* MZ2_STALKER_BLASTER 144 */
|
||||
{24, 0, 6},
|
||||
/* MZ2_DAEDALUS_BLASTER 145 */
|
||||
{32.5, -0.8, 10.0},
|
||||
/* MZ2_MEDIC_BLASTER_2 146 */
|
||||
{12.1, 5.4, 16.5},
|
||||
/* MZ2_CARRIER_RAILGUN 147 */
|
||||
{32, 0, 6},
|
||||
/* MZ2_WIDOW_DISRUPTOR 148 */
|
||||
{57.72, 14.50, 88.81},
|
||||
/* MZ2_WIDOW_BLASTER 149 */
|
||||
{56, 32, 32},
|
||||
/* MZ2_WIDOW_RAIL 150 */
|
||||
{62, -20, 84},
|
||||
/* MZ2_WIDOW_PLASMABEAM 151 */
|
||||
{32, 0, 6},
|
||||
/* MZ2_CARRIER_MACHINEGUN_L2 152 */
|
||||
{61, -32, 12},
|
||||
/* MZ2_CARRIER_MACHINEGUN_R2 153 */
|
||||
{61, 32, 12},
|
||||
/* MZ2_WIDOW_RAIL_LEFT 154 */
|
||||
{17, -62, 91},
|
||||
/* MZ2_WIDOW_RAIL_RIGHT 155 */
|
||||
{68, 12, 86},
|
||||
/* MZ2_WIDOW_BLASTER_SWEEP1 156 */
|
||||
{47.5, 56, 89},
|
||||
/* MZ2_WIDOW_BLASTER_SWEEP2 157 */
|
||||
{54, 52, 91},
|
||||
/* MZ2_WIDOW_BLASTER_SWEEP3 158 */
|
||||
{58, 40, 91},
|
||||
/* MZ2_WIDOW_BLASTER_SWEEP4 159 */
|
||||
{68, 30, 88},
|
||||
/* MZ2_WIDOW_BLASTER_SWEEP5 160 */
|
||||
{74, 20, 88},
|
||||
/* MZ2_WIDOW_BLASTER_SWEEP6 161 */
|
||||
{73, 11, 87},
|
||||
/* MZ2_WIDOW_BLASTER_SWEEP7 162 */
|
||||
{73, 3, 87},
|
||||
/* MZ2_WIDOW_BLASTER_SWEEP8 163 */
|
||||
{70, -12, 87},
|
||||
/* MZ2_WIDOW_BLASTER_SWEEP9 164 */
|
||||
{67, -20, 90},
|
||||
/* MZ2_WIDOW_BLASTER_100 165 */
|
||||
{-20, 76, 90},
|
||||
/* MZ2_WIDOW_BLASTER_90 166 */
|
||||
{-8, 74, 90},
|
||||
/* MZ2_WIDOW_BLASTER_80 167 */
|
||||
{0, 72, 90},
|
||||
/* MZ2_WIDOW_BLASTER_70 168 d06 */
|
||||
{10, 71, 89},
|
||||
/* MZ2_WIDOW_BLASTER_60 169 d07 */
|
||||
{23, 70, 87},
|
||||
/* MZ2_WIDOW_BLASTER_50 170 d08 */
|
||||
{32, 64, 85},
|
||||
/* MZ2_WIDOW_BLASTER_40 171 */
|
||||
{40, 58, 84},
|
||||
/* MZ2_WIDOW_BLASTER_30 172 d10 */
|
||||
{48, 50, 83},
|
||||
/* MZ2_WIDOW_BLASTER_20 173 */
|
||||
{54, 42, 82},
|
||||
/* MZ2_WIDOW_BLASTER_10 174 d12 */
|
||||
{56, 34, 82},
|
||||
/* MZ2_WIDOW_BLASTER_0 175 */
|
||||
{58, 26, 82},
|
||||
/* MZ2_WIDOW_BLASTER_10L 176 d14 */
|
||||
{60, 16, 82},
|
||||
/* MZ2_WIDOW_BLASTER_20L 177 */
|
||||
{59, 6, 81},
|
||||
/* MZ2_WIDOW_BLASTER_30L 178 d16 */
|
||||
{58, -2, 80},
|
||||
/* MZ2_WIDOW_BLASTER_40L 179 */
|
||||
{57, -10, 79},
|
||||
/* MZ2_WIDOW_BLASTER_50L 180 d18 */
|
||||
{54, -18, 78},
|
||||
/* MZ2_WIDOW_BLASTER_60L 181 */
|
||||
{42, -32, 80},
|
||||
/* MZ2_WIDOW_BLASTER_70L 182 d20 */
|
||||
{36, -40, 78},
|
||||
/* MZ2_WIDOW_RUN_1 183 */
|
||||
{68.4, 10.88, 82.08},
|
||||
/* MZ2_WIDOW_RUN_2 184 */
|
||||
{68.51, 8.64, 85.14},
|
||||
/* MZ2_WIDOW_RUN_3 185 */
|
||||
{68.66, 6.38, 88.78},
|
||||
/* MZ2_WIDOW_RUN_4 186 */
|
||||
{68.73, 5.1, 84.47},
|
||||
/* MZ2_WIDOW_RUN_5 187 */
|
||||
{68.82, 4.79, 80.52},
|
||||
/* MZ2_WIDOW_RUN_6 188 */
|
||||
{68.77, 6.11, 85.37},
|
||||
/* MZ2_WIDOW_RUN_7 189 */
|
||||
{68.67, 7.99, 90.24},
|
||||
/* MZ2_WIDOW_RUN_8 190 */
|
||||
{68.55, 9.54, 87.36},
|
||||
/* MZ2_CARRIER_ROCKET_1 191 */
|
||||
{0, 0, -5},
|
||||
/* MZ2_CARRIER_ROCKET_2 192 */
|
||||
{0, 0, -5},
|
||||
/* MZ2_CARRIER_ROCKET_3 193 */
|
||||
{0, 0, -5},
|
||||
/* MZ2_CARRIER_ROCKET_4 194 */
|
||||
{0, 0, -5},
|
||||
/* MZ2_WIDOW2_BEAMER_1 195 */
|
||||
/* { 72.13, -17.63, 93.77 }, */
|
||||
{69.00, -17.63, 93.77},
|
||||
/* MZ2_WIDOW2_BEAMER_2 196 */
|
||||
/* { 71.46, -17.08, 89.82 }, */
|
||||
{69.00, -17.08, 89.82},
|
||||
/* MZ2_WIDOW2_BEAMER_3 197 */
|
||||
/* { 71.47, -18.40, 90.70 }, */
|
||||
{69.00, -18.40, 90.70},
|
||||
/* MZ2_WIDOW2_BEAMER_4 198 */
|
||||
/* { 71.96, -18.34, 94.32 }, */
|
||||
{69.00, -18.34, 94.32},
|
||||
/* MZ2_WIDOW2_BEAMER_5 199 */
|
||||
/* { 72.25, -18.30, 97.98 }, */
|
||||
{69.00, -18.30, 97.98},
|
||||
/* MZ2_WIDOW2_BEAM_SWEEP_1 200 */
|
||||
{45.04, -59.02, 92.24},
|
||||
/* MZ2_WIDOW2_BEAM_SWEEP_2 201 */
|
||||
{50.68, -54.70, 91.96},
|
||||
/* MZ2_WIDOW2_BEAM_SWEEP_3 202 */
|
||||
{56.57, -47.72, 91.65},
|
||||
/* MZ2_WIDOW2_BEAM_SWEEP_4 203 */
|
||||
{61.75, -38.75, 91.38},
|
||||
/* MZ2_WIDOW2_BEAM_SWEEP_5 204 */
|
||||
{65.55, -28.76, 91.24},
|
||||
/* MZ2_WIDOW2_BEAM_SWEEP_6 205 */
|
||||
{67.79, -18.90, 91.22},
|
||||
/* MZ2_WIDOW2_BEAM_SWEEP_7 206 */
|
||||
{68.60, -9.52, 91.23},
|
||||
/* MZ2_WIDOW2_BEAM_SWEEP_8 207 */
|
||||
{68.08, 0.18, 91.32},
|
||||
/* MZ2_WIDOW2_BEAM_SWEEP_9 208 */
|
||||
{66.14, 9.79, 91.44},
|
||||
/* MZ2_WIDOW2_BEAM_SWEEP_10 209 */
|
||||
{62.77, 18.91, 91.65},
|
||||
/* MZ2_WIDOW2_BEAM_SWEEP_11 210 */
|
||||
{58.29, 27.11, 92.00},
|
||||
|
||||
/* end of table */
|
||||
{0.0, 0.0, 0.0}
|
||||
};
|
|
@ -1,97 +0,0 @@
|
|||
/*
|
||||
* KISS PRNG (c) 2011 Shinobu
|
||||
*
|
||||
* This file was optained from zuttobenkyou.wordpress.com
|
||||
* and modified by the Yamagi Quake II developers.
|
||||
*
|
||||
* LICENSE: Public domain
|
||||
*
|
||||
* =======================================================================
|
||||
*
|
||||
* KISS PRNG, as devised by Dr. George Marsaglia
|
||||
*
|
||||
* =======================================================================
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define QSIZE 0x200000
|
||||
#define CNG (cng = 6906969069ULL * cng + 13579)
|
||||
#define XS (xs ^= (xs << 13), xs ^= (xs >> 17), xs ^= (xs << 43))
|
||||
#define KISS (B64MWC() + CNG + XS)
|
||||
|
||||
static uint64_t QARY[QSIZE];
|
||||
static int j;
|
||||
static uint64_t carry;
|
||||
static uint64_t xs;
|
||||
static uint64_t cng;
|
||||
|
||||
uint64_t
|
||||
B64MWC(void)
|
||||
{
|
||||
uint64_t t, x;
|
||||
|
||||
j = (j + 1) & (QSIZE - 1);
|
||||
x = QARY[j];
|
||||
t = (x << 28) + carry;
|
||||
carry = (x >> 36) - (t < x);
|
||||
return QARY[j] = t - x;
|
||||
}
|
||||
|
||||
/*
|
||||
* Generate a pseudorandom
|
||||
* integer >0.
|
||||
*/
|
||||
int
|
||||
randk(void)
|
||||
{
|
||||
int r;
|
||||
|
||||
r = (int)KISS;
|
||||
r = (r < 0) ? (r * -1) : r;
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
/*
|
||||
* Generate a pseudorandom
|
||||
* signed float between
|
||||
* 0 and 1.
|
||||
*/
|
||||
float
|
||||
frandk(void)
|
||||
{
|
||||
return (randk()&32767)* (1.0/32767);
|
||||
}
|
||||
|
||||
/* Generate a pseudorandom
|
||||
* float between -1 and 1.
|
||||
*/
|
||||
float
|
||||
crandk(void)
|
||||
{
|
||||
return (randk()&32767)* (2.0/32767) - 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Seeds the PRNG
|
||||
*/
|
||||
void
|
||||
randk_seed(void)
|
||||
{
|
||||
uint64_t i;
|
||||
|
||||
/* Seed QARY[] with CNG+XS: */
|
||||
for (i = 0; i < QSIZE; i++)
|
||||
{
|
||||
QARY[i] = CNG + XS;
|
||||
}
|
||||
|
||||
/* Run through several rounds
|
||||
to warm up the state */
|
||||
for (i = 0; i < 256; i++)
|
||||
{
|
||||
randk();
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (C) 1997-2001 Id Software, Inc.
|
||||
* Copyright (c) ZeniMax Media Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -88,8 +89,12 @@ AI_SetSightClient(void)
|
|||
}
|
||||
}
|
||||
|
||||
/* ============================================================================ */
|
||||
|
||||
/*
|
||||
* Move the specified distance at current facing.
|
||||
* Move the specified distance at current
|
||||
* facing. This replaces the QC functions:
|
||||
* ai_forward, ai_back, ai_pain, and ai_painforward
|
||||
*/
|
||||
void
|
||||
ai_move(edict_t *self, float dist)
|
||||
|
@ -288,6 +293,8 @@ ai_turn(edict_t *self, float dist)
|
|||
* .pausetime
|
||||
* A monster will leave it's stand state and head towards it's .movetarget when
|
||||
* time > .pausetime.
|
||||
*
|
||||
* walkmove(angle, speed) primitive is all or nothing
|
||||
*/
|
||||
|
||||
/* ============================================================================ */
|
||||
|
@ -391,7 +398,6 @@ infront(edict_t *self, edict_t *other)
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
/* ============================================================================ */
|
||||
|
||||
void
|
||||
|
@ -695,6 +701,7 @@ FindTarget(edict_t *self)
|
|||
self->enemy = client;
|
||||
}
|
||||
|
||||
/* got one */
|
||||
FoundTarget(self);
|
||||
|
||||
if (!(self->monsterinfo.aiflags & AI_SOUND_TARGET) &&
|
||||
|
@ -863,7 +870,8 @@ ai_run_melee(edict_t *self)
|
|||
|
||||
if (FacingIdeal(self))
|
||||
{
|
||||
if (self->monsterinfo.melee) {
|
||||
if (self->monsterinfo.melee)
|
||||
{
|
||||
self->monsterinfo.melee(self);
|
||||
self->monsterinfo.attack_state = AS_STRAIGHT;
|
||||
}
|
||||
|
@ -1063,7 +1071,7 @@ ai_checkattack(edict_t *self)
|
|||
}
|
||||
|
||||
/* look for other coop players here */
|
||||
if (coop->value && (self->monsterinfo.search_time < level.time))
|
||||
if (coop && coop->value && (self->monsterinfo.search_time < level.time))
|
||||
{
|
||||
if (FindTarget(self))
|
||||
{
|
||||
|
|
|
@ -204,7 +204,7 @@ CheckPowerArmor(edict_t *ent, vec3_t point, vec3_t normal, int damage,
|
|||
gclient_t *client;
|
||||
int save;
|
||||
int power_armor_type;
|
||||
int index;
|
||||
int index = 0;
|
||||
int damagePerCell;
|
||||
int pa_te_type;
|
||||
int power = 0;
|
||||
|
@ -621,7 +621,7 @@ T_Damage(edict_t *targ, edict_t *inflictor, edict_t *attacker,
|
|||
|
||||
/* check for invincibility */
|
||||
if ((client && (client->invincible_framenum > level.framenum)) &&
|
||||
!(dflags & DAMAGE_NO_PROTECTION))
|
||||
!(dflags & DAMAGE_NO_PROTECTION) && (mod != MOD_TRAP))
|
||||
{
|
||||
if (targ->pain_debounce_time < level.time)
|
||||
{
|
||||
|
@ -648,7 +648,14 @@ T_Damage(edict_t *targ, edict_t *inflictor, edict_t *attacker,
|
|||
{
|
||||
if ((targ->svflags & SVF_MONSTER) || (client))
|
||||
{
|
||||
SpawnDamage(TE_BLOOD, point, normal);
|
||||
if (strcmp(targ->classname, "monster_gekk") == 0)
|
||||
{
|
||||
SpawnDamage(TE_GREENBLOOD, point, normal);
|
||||
}
|
||||
else
|
||||
{
|
||||
SpawnDamage(TE_BLOOD, point, normal);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (C) 1997-2001 Id Software, Inc.
|
||||
* Copyright (c) ZeniMax Media Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -114,7 +114,8 @@ typedef enum
|
|||
AMMO_GRENADES,
|
||||
AMMO_CELLS,
|
||||
AMMO_SLUGS,
|
||||
|
||||
AMMO_MAGSLUG,
|
||||
AMMO_TRAP,
|
||||
AMMO_FLECHETTES,
|
||||
AMMO_TESLA,
|
||||
AMMO_PROX,
|
||||
|
@ -836,6 +837,8 @@ void monster_fire_bfg(edict_t *self, vec3_t start, vec3_t aimdir,
|
|||
int flashtype);
|
||||
void monster_fire_ionripper(edict_t *self, vec3_t start, vec3_t dir, int damage,
|
||||
int speed, int flashtype, int effect);
|
||||
void monster_fire_heat(edict_t *self, vec3_t start, vec3_t dir, int damage,
|
||||
int speed, int flashtype);
|
||||
void monster_dabeam(edict_t *self);
|
||||
void monster_fire_blueblaster(edict_t *self, vec3_t start, vec3_t dir, int damage,
|
||||
int speed, int flashtype, int effect);
|
||||
|
@ -904,6 +907,8 @@ void fire_bfg(edict_t *self, vec3_t start, vec3_t dir, int damage,
|
|||
int speed, float damage_radius);
|
||||
void fire_ionripper(edict_t *self, vec3_t start, vec3_t aimdir, int damage,
|
||||
int speed, int effect);
|
||||
void fire_heat(edict_t *self, vec3_t start, vec3_t dir, int damage, int speed,
|
||||
float damage_radius, int radius_damage);
|
||||
void fire_blueblaster(edict_t *self, vec3_t start, vec3_t aimdir, int damage,
|
||||
int speed, int effect);
|
||||
void fire_plasma(edict_t *self, vec3_t start, vec3_t dir, int damage, int speed,
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
* Copyright (C) 1997-2001 Id Software, Inc.
|
||||
* Copyright (C) 2011 Knightmare
|
||||
* Copyright (C) 2011 Yamagi Burmeister
|
||||
* Copyright (c) ZeniMax Media Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -92,7 +93,7 @@
|
|||
#endif
|
||||
|
||||
/*
|
||||
* Older operating systen and architecture detection
|
||||
* Older operating system and architecture detection
|
||||
* macros, implemented by savegame version YQ2-1.
|
||||
*/
|
||||
#if defined(__APPLE__)
|
||||
|
@ -736,6 +737,7 @@ ReadClient(FILE *f, gclient_t *client, short save_ver)
|
|||
ReadField(f, field, (byte *)client);
|
||||
}
|
||||
}
|
||||
|
||||
if (save_ver < 3)
|
||||
{
|
||||
InitClientResp(client);
|
||||
|
@ -847,8 +849,7 @@ ReadGame(const char *filename)
|
|||
fclose(f);
|
||||
gi.error("Savegame from an incompatible version.\n");
|
||||
}
|
||||
|
||||
if (save_ver == 1)
|
||||
else if (save_ver == 1)
|
||||
{
|
||||
if (strcmp(sv.game, GAMEVERSION) != 0)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright (C) 1997-2001 Id Software, Inc.
|
||||
* Copyright (C) 2011 Yamagi Burmeister
|
||||
* Copyright (c) ZeniMax Media Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,9 +1,24 @@
|
|||
/*
|
||||
* Copyright (C) 1997-2001 Id Software, Inc.
|
||||
* Copyright (c) ZeniMax Media Inc.
|
||||
* Licensed under the GNU General Public License 2.0.
|
||||
*/
|
||||
|
||||
/* =======================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* =======================================================================
|
||||
*
|
||||
* The basic AI functions like enemy detection, attacking and so on.
|
||||
*
|
||||
|
@ -14,7 +29,7 @@
|
|||
|
||||
qboolean FindTarget(edict_t *self);
|
||||
extern cvar_t *maxclients;
|
||||
qboolean ai_checkattack(edict_t *self, float dist);
|
||||
qboolean ai_checkattack(edict_t *self);
|
||||
qboolean enemy_vis;
|
||||
qboolean enemy_infront;
|
||||
int enemy_range;
|
||||
|
@ -26,8 +41,9 @@ float enemy_yaw;
|
|||
* Called once each frame to set level.sight_client
|
||||
* to the player to be checked for in findtarget.
|
||||
* If all clients are either dead or in notarget,
|
||||
* sight_client will be null. In coop games,
|
||||
* sight_client will cycle between the clients.
|
||||
* sight_client will be null.
|
||||
* In coop games, sight_client will cycle
|
||||
* between the clients.
|
||||
*/
|
||||
void
|
||||
AI_SetSightClient(void)
|
||||
|
@ -83,13 +99,20 @@ AI_SetSightClient(void)
|
|||
void
|
||||
ai_move(edict_t *self, float dist)
|
||||
{
|
||||
if (!self)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
M_walkmove(self, self->s.angles[YAW], dist);
|
||||
}
|
||||
|
||||
/*
|
||||
* Used for standing around and looking for
|
||||
* players. Distance is for slight position
|
||||
* adjustments needed by the animations
|
||||
*
|
||||
* Used for standing around and looking
|
||||
* for players Distance is for slight
|
||||
* position adjustments needed by the
|
||||
* animations
|
||||
*/
|
||||
void
|
||||
ai_stand(edict_t *self, float dist)
|
||||
|
@ -116,12 +139,13 @@ ai_stand(edict_t *self, float dist)
|
|||
if ((self->s.angles[YAW] != self->ideal_yaw) &&
|
||||
self->monsterinfo.aiflags & AI_TEMP_STAND_GROUND)
|
||||
{
|
||||
self->monsterinfo.aiflags &= ~(AI_STAND_GROUND | AI_TEMP_STAND_GROUND);
|
||||
self->monsterinfo.aiflags &=
|
||||
~(AI_STAND_GROUND | AI_TEMP_STAND_GROUND);
|
||||
self->monsterinfo.run(self);
|
||||
}
|
||||
|
||||
M_ChangeYaw(self);
|
||||
ai_checkattack(self, 0);
|
||||
ai_checkattack(self);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -191,8 +215,8 @@ ai_walk(edict_t *self, float dist)
|
|||
}
|
||||
|
||||
/*
|
||||
* Turns towards target and advances.
|
||||
* Use this call with a distnace of 0
|
||||
* Turns towards target and advances
|
||||
* Use this call with a distance of 0
|
||||
* to replace ai_face
|
||||
*/
|
||||
void
|
||||
|
@ -220,8 +244,9 @@ ai_charge(edict_t *self, float dist)
|
|||
}
|
||||
|
||||
/*
|
||||
* Don't move, but turn towards ideal_yaw
|
||||
* Distance is for slight position adjustments
|
||||
* Don't move, but turn towards
|
||||
* ideal_yaw. Distance is for
|
||||
* slight position adjustments
|
||||
* needed by the animations
|
||||
*/
|
||||
void
|
||||
|
@ -245,6 +270,8 @@ ai_turn(edict_t *self, float dist)
|
|||
M_ChangeYaw(self);
|
||||
}
|
||||
|
||||
/* ============================================================================ */
|
||||
|
||||
/*
|
||||
* .enemy
|
||||
* Will be world if not currently angry at anyone.
|
||||
|
@ -270,8 +297,10 @@ ai_turn(edict_t *self, float dist)
|
|||
* walkmove(angle, speed) primitive is all or nothing
|
||||
*/
|
||||
|
||||
/* ============================================================================ */
|
||||
|
||||
/*
|
||||
* returns the range catagorization of an entity reletive to self
|
||||
* returns the range categorization of an entity relative to self
|
||||
* 0 melee range, will become hostile even if back is turned
|
||||
* 1 visibility and infront, or visibility and show hostile
|
||||
* 2 infront and show hostile
|
||||
|
@ -311,7 +340,7 @@ range(edict_t *self, edict_t *other)
|
|||
|
||||
/*
|
||||
* returns 1 if the entity is visible
|
||||
* to self, even if not infront()
|
||||
* to self, even if not infront
|
||||
*/
|
||||
qboolean
|
||||
visible(edict_t *self, edict_t *other)
|
||||
|
@ -356,6 +385,7 @@ infront(edict_t *self, edict_t *other)
|
|||
}
|
||||
|
||||
AngleVectors(self->s.angles, forward, NULL, NULL);
|
||||
|
||||
VectorSubtract(other->s.origin, self->s.origin, vec);
|
||||
VectorNormalize(vec);
|
||||
dot = DotProduct(vec, forward);
|
||||
|
@ -439,7 +469,8 @@ FoundTarget(edict_t *self)
|
|||
self->goalentity = self->movetarget = self->enemy;
|
||||
HuntTarget(self);
|
||||
gi.dprintf("%s at %s, combattarget %s not found\n",
|
||||
self->classname, vtos(self->s.origin),
|
||||
self->classname,
|
||||
vtos(self->s.origin),
|
||||
self->combattarget);
|
||||
return;
|
||||
}
|
||||
|
@ -457,15 +488,21 @@ FoundTarget(edict_t *self)
|
|||
}
|
||||
|
||||
/*
|
||||
* Self is currently not attacking anything, so try
|
||||
* to find a target. Returns TRUE if an enemy was sighted.
|
||||
* When a player fires a missile, the point of impact
|
||||
* becomes a fakeplayer so that monsters that see the
|
||||
* impact will respond as if they had seen the player.
|
||||
* Self is currently not attacking anything,
|
||||
* so try to find a target
|
||||
*
|
||||
* To avoid spending too much time, only a single client
|
||||
* (or fakeclient) is checked each frame. This means multi
|
||||
* player games will have slightly slower noticing monsters.
|
||||
* Returns TRUE if an enemy was sighted
|
||||
*
|
||||
* When a player fires a missile, the point
|
||||
* of impact becomes a fakeplayer so that
|
||||
* monsters that see the impact will respond
|
||||
* as if they had seen the player.
|
||||
*
|
||||
* To avoid spending too much time, only
|
||||
* a single client (or fakeclient) is
|
||||
* checked each frame. This means multi
|
||||
* player games will have slightly
|
||||
* slower noticing monsters.
|
||||
*/
|
||||
qboolean
|
||||
FindTarget(edict_t *self)
|
||||
|
@ -490,10 +527,11 @@ FindTarget(edict_t *self)
|
|||
return false;
|
||||
}
|
||||
|
||||
/* if the first spawnflag bit is set, the
|
||||
monster will only wake up on really seeing
|
||||
the player, not another monster getting angry
|
||||
or hearing something */
|
||||
/* if the first spawnflag bit is set, the monster
|
||||
will only wake up on really seeing the player,
|
||||
not another monster getting angry or hearing
|
||||
something */
|
||||
|
||||
heardit = false;
|
||||
|
||||
if ((level.sight_entity_framenum >= (level.framenum - 1)) &&
|
||||
|
@ -734,7 +772,7 @@ M_CheckAttack(edict_t *self)
|
|||
if (enemy_range == RANGE_MELEE)
|
||||
{
|
||||
/* don't always melee in easy mode */
|
||||
if ((skill->value == SKILL_EASY) && (rand() & 3))
|
||||
if ((skill->value == SKILL_EASY) && (randk() & 3))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -816,8 +854,8 @@ M_CheckAttack(edict_t *self)
|
|||
}
|
||||
|
||||
/*
|
||||
* Turn and close until within
|
||||
* an angle to launch a melee attack
|
||||
* Turn and close until within an
|
||||
* angle to launch a melee attack
|
||||
*/
|
||||
void
|
||||
ai_run_melee(edict_t *self)
|
||||
|
@ -841,8 +879,8 @@ ai_run_melee(edict_t *self)
|
|||
}
|
||||
|
||||
/*
|
||||
* Turn in place until within
|
||||
* an angle to launch a missile attack
|
||||
* Turn in place until within an
|
||||
* angle to launch a missile attack
|
||||
*/
|
||||
void
|
||||
ai_run_missile(edict_t *self)
|
||||
|
@ -865,8 +903,8 @@ ai_run_missile(edict_t *self)
|
|||
}
|
||||
|
||||
/*
|
||||
* Strafe sideways, but stay
|
||||
* at aproximately the same range
|
||||
* Strafe sideways, but stay at
|
||||
* approximately the same range
|
||||
*/
|
||||
void
|
||||
ai_run_slide(edict_t *self, float distance)
|
||||
|
@ -900,8 +938,9 @@ ai_run_slide(edict_t *self, float distance)
|
|||
}
|
||||
|
||||
/*
|
||||
* Decides if we're going to
|
||||
* attack or do something else
|
||||
* Decides if we're going to attack
|
||||
* or do something else used by
|
||||
* ai_run and ai_stand
|
||||
*/
|
||||
static qboolean
|
||||
hesDeadJim(const edict_t *self)
|
||||
|
@ -932,7 +971,7 @@ hesDeadJim(const edict_t *self)
|
|||
}
|
||||
|
||||
qboolean
|
||||
ai_checkattack(edict_t *self, float dist)
|
||||
ai_checkattack(edict_t *self)
|
||||
{
|
||||
vec3_t temp;
|
||||
|
||||
|
@ -972,7 +1011,8 @@ ai_checkattack(edict_t *self, float dist)
|
|||
|
||||
if (self->monsterinfo.aiflags & AI_TEMP_STAND_GROUND)
|
||||
{
|
||||
self->monsterinfo.aiflags &= ~(AI_STAND_GROUND | AI_TEMP_STAND_GROUND);
|
||||
self->monsterinfo.aiflags &=
|
||||
~(AI_STAND_GROUND | AI_TEMP_STAND_GROUND);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1018,7 +1058,8 @@ ai_checkattack(edict_t *self, float dist)
|
|||
}
|
||||
}
|
||||
|
||||
self->show_hostile = level.time + 1; /* wake up other monsters */
|
||||
/* wake up other monsters */
|
||||
self->show_hostile = level.time + 1;
|
||||
|
||||
/* check knowledge of enemy */
|
||||
enemy_vis = visible(self, self->enemy);
|
||||
|
@ -1029,6 +1070,7 @@ ai_checkattack(edict_t *self, float dist)
|
|||
VectorCopy(self->enemy->s.origin, self->monsterinfo.last_sighting);
|
||||
}
|
||||
|
||||
/* look for other coop players here */
|
||||
if (coop && coop->value && (self->monsterinfo.search_time < level.time))
|
||||
{
|
||||
if (FindTarget(self))
|
||||
|
@ -1057,8 +1099,8 @@ ai_checkattack(edict_t *self, float dist)
|
|||
return true;
|
||||
}
|
||||
|
||||
/* if enemy is not currently
|
||||
visible, we will never attack */
|
||||
/* if enemy is not currently visible,
|
||||
we will never attack */
|
||||
if (!enemy_vis)
|
||||
{
|
||||
return false;
|
||||
|
@ -1068,7 +1110,8 @@ ai_checkattack(edict_t *self, float dist)
|
|||
}
|
||||
|
||||
/*
|
||||
* The monster has an enemy it is trying to kill
|
||||
* The monster has an enemy
|
||||
* it is trying to kill
|
||||
*/
|
||||
void
|
||||
ai_run(edict_t *self, float dist)
|
||||
|
@ -1125,7 +1168,7 @@ ai_run(edict_t *self, float dist)
|
|||
}
|
||||
}
|
||||
|
||||
if (ai_checkattack(self, dist))
|
||||
if (ai_checkattack(self))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -1153,7 +1196,7 @@ ai_run(edict_t *self, float dist)
|
|||
return;
|
||||
}
|
||||
|
||||
tempgoal = G_SpawnOptional();
|
||||
tempgoal = G_SpawnOptional();
|
||||
|
||||
if (!tempgoal)
|
||||
{
|
||||
|
@ -1221,8 +1264,9 @@ ai_run(edict_t *self, float dist)
|
|||
|
||||
if (new)
|
||||
{
|
||||
tr = gi.trace(self->s.origin, self->mins, self->maxs, self->monsterinfo.last_sighting,
|
||||
self, MASK_PLAYERSOLID);
|
||||
tr = gi.trace(self->s.origin, self->mins, self->maxs,
|
||||
self->monsterinfo.last_sighting, self,
|
||||
MASK_PLAYERSOLID);
|
||||
|
||||
if (tr.fraction < 1)
|
||||
{
|
||||
|
@ -1252,8 +1296,8 @@ ai_run(edict_t *self, float dist)
|
|||
if (left < 1)
|
||||
{
|
||||
VectorSet(v, d2 * left * 0.5, -16, 0);
|
||||
G_ProjectSource(self->s.origin, v, v_forward, v_right,
|
||||
left_target);
|
||||
G_ProjectSource(self->s.origin, v, v_forward,
|
||||
v_right, left_target);
|
||||
}
|
||||
|
||||
VectorCopy(self->monsterinfo.last_sighting,
|
||||
|
@ -1269,11 +1313,12 @@ ai_run(edict_t *self, float dist)
|
|||
if (right < 1)
|
||||
{
|
||||
VectorSet(v, d2 * right * 0.5, 16, 0);
|
||||
G_ProjectSource(self->s.origin, v, v_forward,
|
||||
v_right, right_target);
|
||||
G_ProjectSource(self->s.origin, v, v_forward, v_right,
|
||||
right_target);
|
||||
}
|
||||
|
||||
VectorCopy(self->monsterinfo.last_sighting, self->monsterinfo.saved_goal);
|
||||
VectorCopy(self->monsterinfo.last_sighting,
|
||||
self->monsterinfo.saved_goal);
|
||||
self->monsterinfo.aiflags |= AI_PURSUE_TEMP;
|
||||
VectorCopy(right_target, self->goalentity->s.origin);
|
||||
VectorCopy(right_target, self->monsterinfo.last_sighting);
|
|
@ -153,13 +153,13 @@ Killed(edict_t *targ, edict_t *inflictor, edict_t *attacker,
|
|||
}
|
||||
|
||||
void
|
||||
SpawnDamage(int type, vec3_t origin, vec3_t normal, int damage)
|
||||
SpawnDamage(int type, vec3_t origin, vec3_t normal)
|
||||
{
|
||||
gi.WriteByte (svc_temp_entity);
|
||||
gi.WriteByte (type);
|
||||
gi.WritePosition (origin);
|
||||
gi.WriteDir (normal);
|
||||
gi.multicast (origin, MULTICAST_PVS);
|
||||
gi.WriteByte(svc_temp_entity);
|
||||
gi.WriteByte(type);
|
||||
gi.WritePosition(origin);
|
||||
gi.WriteDir(normal);
|
||||
gi.multicast(origin, MULTICAST_PVS);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -286,7 +286,7 @@ CheckPowerArmor(edict_t *ent, vec3_t point, vec3_t normal,
|
|||
save = damage;
|
||||
}
|
||||
|
||||
SpawnDamage(pa_te_type, point, normal, save);
|
||||
SpawnDamage(pa_te_type, point, normal);
|
||||
ent->powerarmor_time = level.time + 0.2;
|
||||
|
||||
power_used = save / damagePerCell;
|
||||
|
@ -363,7 +363,7 @@ CheckArmor(edict_t *ent, vec3_t point, vec3_t normal,
|
|||
}
|
||||
|
||||
client->pers.inventory[index] -= save;
|
||||
SpawnDamage(te_sparks, point, normal, save);
|
||||
SpawnDamage(te_sparks, point, normal);
|
||||
|
||||
return save;
|
||||
}
|
||||
|
@ -601,7 +601,7 @@ T_Damage(edict_t *targ, edict_t *inflictor, edict_t *attacker, vec3_t dir,
|
|||
{
|
||||
take = 0;
|
||||
save = damage;
|
||||
SpawnDamage(te_sparks, point, normal, save);
|
||||
SpawnDamage(te_sparks, point, normal);
|
||||
}
|
||||
|
||||
/* check for invincibility */
|
||||
|
@ -611,7 +611,7 @@ T_Damage(edict_t *targ, edict_t *inflictor, edict_t *attacker, vec3_t dir,
|
|||
if (targ->pain_debounce_time < level.time)
|
||||
{
|
||||
gi.sound(targ, CHAN_ITEM, gi.soundindex(
|
||||
"items/protect4.wav"), 1, ATTN_NORM, 0);
|
||||
"items/protect4.wav"), 1, ATTN_NORM, 0);
|
||||
targ->pain_debounce_time = level.time + 2;
|
||||
}
|
||||
|
||||
|
@ -635,16 +635,16 @@ T_Damage(edict_t *targ, edict_t *inflictor, edict_t *attacker, vec3_t dir,
|
|||
{
|
||||
if (strcmp(targ->classname, "monster_gekk") == 0)
|
||||
{
|
||||
SpawnDamage(TE_GREENBLOOD, point, normal, take);
|
||||
SpawnDamage(TE_GREENBLOOD, point, normal);
|
||||
}
|
||||
else
|
||||
{
|
||||
SpawnDamage(TE_BLOOD, point, normal, take);
|
||||
SpawnDamage(TE_BLOOD, point, normal);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SpawnDamage(te_sparks, point, normal, take);
|
||||
SpawnDamage(te_sparks, point, normal);
|
||||
}
|
||||
|
||||
targ->health = targ->health - take;
|
|
@ -1,9 +1,23 @@
|
|||
/*
|
||||
* Copyright (C) 1997-2001 Id Software, Inc.
|
||||
* Copyright (c) ZeniMax Media Inc.
|
||||
* Licensed under the GNU General Public License 2.0.
|
||||
*/
|
||||
|
||||
/*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* =======================================================================
|
||||
*
|
||||
* Jump in into the game.so and support functions.
|
||||
|
@ -27,8 +41,8 @@ edict_t *g_edicts;
|
|||
|
||||
cvar_t *deathmatch;
|
||||
cvar_t *coop;
|
||||
cvar_t *coop_elevator_delay;
|
||||
cvar_t *coop_pickup_weapons;
|
||||
cvar_t *coop_elevator_delay;
|
||||
cvar_t *dmflags;
|
||||
cvar_t *skill;
|
||||
cvar_t *fraglimit;
|
||||
|
@ -42,7 +56,9 @@ cvar_t *maxentities;
|
|||
cvar_t *g_select_empty;
|
||||
cvar_t *dedicated;
|
||||
cvar_t *g_footsteps;
|
||||
cvar_t *g_monsterfootsteps;
|
||||
cvar_t *g_fix_triggered;
|
||||
cvar_t *g_commanderbody_nogod;
|
||||
|
||||
cvar_t *filterban;
|
||||
|
||||
|
@ -75,7 +91,7 @@ cvar_t *aimfix;
|
|||
cvar_t *g_machinegun_norecoil;
|
||||
cvar_t *g_swap_speed;
|
||||
|
||||
void SpawnEntities(char *mapname, char *entities, char *spawnpoint);
|
||||
void SpawnEntities(const char *mapname, char *entities, const char *spawnpoint);
|
||||
void ClientThink(edict_t *ent, usercmd_t *cmd);
|
||||
qboolean ClientConnect(edict_t *ent, char *userinfo);
|
||||
void ClientUserinfoChanged(edict_t *ent, char *userinfo);
|
||||
|
@ -83,10 +99,10 @@ void ClientDisconnect(edict_t *ent);
|
|||
void ClientBegin(edict_t *ent);
|
||||
void ClientCommand(edict_t *ent);
|
||||
void RunEntity(edict_t *ent);
|
||||
void WriteGame(char *filename, qboolean autosave);
|
||||
void ReadGame(char *filename);
|
||||
void WriteLevel(char *filename);
|
||||
void ReadLevel(char *filename);
|
||||
void WriteGame(const char *filename, qboolean autosave);
|
||||
void ReadGame(const char *filename);
|
||||
void WriteLevel(const char *filename);
|
||||
void ReadLevel(const char *filename);
|
||||
void InitGame(void);
|
||||
void G_RunFrame(void);
|
||||
|
||||
|
@ -102,10 +118,11 @@ ShutdownGame(void)
|
|||
}
|
||||
|
||||
/*
|
||||
* Returns a pointer to the structure with
|
||||
* all entry points and global variables
|
||||
* Returns a pointer to the structure
|
||||
* with all entry points and global
|
||||
* variables
|
||||
*/
|
||||
game_export_t *
|
||||
Q2_DLL_EXPORTED game_export_t *
|
||||
GetGameAPI(game_import_t *import)
|
||||
{
|
||||
gi = *import;
|
||||
|
@ -139,27 +156,31 @@ GetGameAPI(game_import_t *import)
|
|||
return &globals;
|
||||
}
|
||||
|
||||
/*
|
||||
* this is only here so the functions
|
||||
* in shared source files can link
|
||||
*/
|
||||
void
|
||||
Sys_Error(char *error, ...)
|
||||
Sys_Error(const char *error, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
char text[1024];
|
||||
|
||||
va_start(argptr, error);
|
||||
vsprintf(text, error, argptr);
|
||||
vsnprintf(text, sizeof(text), error, argptr);
|
||||
va_end(argptr);
|
||||
|
||||
gi.error("%s", text);
|
||||
}
|
||||
|
||||
void
|
||||
Com_Printf(char *msg, ...)
|
||||
Com_Printf(const char *msg, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
char text[1024];
|
||||
|
||||
va_start(argptr, msg);
|
||||
vsprintf(text, msg, argptr);
|
||||
vsnprintf(text, sizeof(text), msg, argptr);
|
||||
va_end(argptr);
|
||||
|
||||
gi.dprintf("%s", text);
|
||||
|
@ -174,7 +195,7 @@ ClientEndServerFrames(void)
|
|||
edict_t *ent;
|
||||
|
||||
/* calc the player views now that all
|
||||
pushing and damage has been added */
|
||||
pushing and damage has been added */
|
||||
for (i = 0; i < maxclients->value; i++)
|
||||
{
|
||||
ent = g_edicts + 1 + i;
|
||||
|
@ -274,7 +295,7 @@ EndDMLevel(void)
|
|||
{
|
||||
BeginIntermission(CreateTargetChangeLevel(level.nextmap));
|
||||
}
|
||||
else /* search for a changelevel */
|
||||
else /* search for a changelevel */
|
||||
{
|
||||
ent = G_Find(NULL, FOFS(classname), "target_changelevel");
|
||||
|
||||
|
@ -294,8 +315,8 @@ CheckNeedPass(void)
|
|||
{
|
||||
int need;
|
||||
|
||||
/* if password or spectator_password has changed,
|
||||
update needpass as needed */
|
||||
/* if password or spectator_password has
|
||||
changed, update needpass as needed */
|
||||
if (password->modified || spectator_password->modified)
|
||||
{
|
||||
password->modified = spectator_password->modified = false;
|
||||
|
@ -410,8 +431,8 @@ G_RunFrame(void)
|
|||
level.framenum++;
|
||||
level.time = level.framenum * FRAMETIME;
|
||||
|
||||
debristhisframe = 0;
|
||||
gibsthisframe = 0;
|
||||
debristhisframe = 0;
|
||||
|
||||
/* choose a client for monsters to target this frame */
|
||||
AI_SetSightClient();
|
||||
|
@ -423,8 +444,9 @@ G_RunFrame(void)
|
|||
return;
|
||||
}
|
||||
|
||||
/* treat each object in turn even
|
||||
the world gets a chance to think */
|
||||
/* treat each object in turn
|
||||
even the world gets a chance
|
||||
to think */
|
||||
ent = &g_edicts[0];
|
||||
|
||||
for (i = 0; i < globals.num_edicts; i++, ent++)
|
|
@ -64,7 +64,7 @@ check_dodge(edict_t *self, vec3_t start, vec3_t dir, int speed)
|
|||
{
|
||||
VectorSubtract(tr.endpos, start, v);
|
||||
eta = (VectorLength(v) - tr.ent->maxs[0]) / speed;
|
||||
tr.ent->monsterinfo.dodge(tr.ent, self, eta, &tr);
|
||||
tr.ent->monsterinfo.dodge(tr.ent, self, eta);
|
||||
}
|
||||
}
|
||||
|
1
src/xatrix/header/game.h
Normal file
1
src/xatrix/header/game.h
Normal file
|
@ -0,0 +1 @@
|
|||
#include "../../game/header/game.h"
|
1
src/xatrix/header/local.h
Normal file
1
src/xatrix/header/local.h
Normal file
|
@ -0,0 +1 @@
|
|||
#include "../../game/header/local.h"
|
|
@ -1,9 +1,25 @@
|
|||
/*
|
||||
* Copyright (C) 1997-2001 Id Software, Inc.
|
||||
* Copyright (C) 2011 Knightmare
|
||||
* Copyright (C) 2011 Yamagi Burmeister
|
||||
* Copyright (c) ZeniMax Media Inc.
|
||||
* Licensed under the GNU General Public License 2.0.
|
||||
*/
|
||||
|
||||
/*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* =======================================================================
|
||||
*
|
||||
* The savegame system.
|
||||
|
@ -49,15 +65,19 @@
|
|||
* system and architecture are in the hands of the user.
|
||||
*/
|
||||
|
||||
#include "../../common/header/common.h" // YQ2ARCH
|
||||
#include "../header/local.h"
|
||||
|
||||
#include "savegame.h"
|
||||
/*
|
||||
* When ever the savegame version is changed, q2 will refuse to
|
||||
* load older savegames. This should be bumped if the files
|
||||
* in tables/ are changed, otherwise strange things may happen.
|
||||
*/
|
||||
#define SAVEGAMEVER "YQ2-4"
|
||||
* When ever the savegame version is changed, q2 will refuse to
|
||||
* load older savegames. This should be bumped if the files
|
||||
* in tables/ are changed, otherwise strange things may happen.
|
||||
*/
|
||||
#define SAVEGAMEVER "YQ2-6"
|
||||
|
||||
#ifndef BUILD_DATE
|
||||
#define BUILD_DATE __DATE__
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This macros are used to prohibit loading of savegames
|
||||
|
@ -77,62 +97,31 @@
|
|||
* macros, implemented by savegame version YQ2-1.
|
||||
*/
|
||||
#if defined(__APPLE__)
|
||||
#define YQ2OSTYPE_1 "MacOS X"
|
||||
#define OSTYPE_1 "MacOS X"
|
||||
#elif defined(__FreeBSD__)
|
||||
#define YQ2OSTYPE_1 "FreeBSD"
|
||||
#define OSTYPE_1 "FreeBSD"
|
||||
#elif defined(__OpenBSD__)
|
||||
#define YQ2OSTYPE_1 "OpenBSD"
|
||||
#define OSTYPE_1 "OpenBSD"
|
||||
#elif defined(__linux__)
|
||||
#define YQ2OSTYPE_1 "Linux"
|
||||
#define OSTYPE_1 "Linux"
|
||||
#elif defined(_WIN32)
|
||||
#define YQ2OSTYPE_1 "Windows"
|
||||
#define OSTYPE_1 "Windows"
|
||||
#else
|
||||
#define YQ2OSTYPE_1 "Unknown"
|
||||
#define OSTYPE_1 "Unknown"
|
||||
#endif
|
||||
|
||||
#if defined(__i386__)
|
||||
#define YQ2ARCH_1 "i386"
|
||||
#define ARCH_1 "i386"
|
||||
#elif defined(__x86_64__)
|
||||
#define YQ2ARCH_1 "amd64"
|
||||
#define ARCH_1 "amd64"
|
||||
#elif defined(__sparc__)
|
||||
#define YQ2ARCH_1 "sparc64"
|
||||
#define ARCH_1 "sparc64"
|
||||
#elif defined(__ia64__)
|
||||
#define YQ2ARCH_1 "ia64"
|
||||
#define ARCH_1 "ia64"
|
||||
#else
|
||||
#define YQ2ARCH_1 "unknown"
|
||||
#define ARCH_1 "unknown"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Connects a human readable
|
||||
* function signature with
|
||||
* the corresponding pointer
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
char *funcStr;
|
||||
byte *funcPtr;
|
||||
} functionList_t;
|
||||
|
||||
/*
|
||||
* Connects a human readable
|
||||
* mmove_t string with the
|
||||
* correspondig pointer
|
||||
* */
|
||||
typedef struct
|
||||
{
|
||||
char *mmoveStr;
|
||||
mmove_t *mmovePtr;
|
||||
} mmoveList_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char ver[32];
|
||||
char game[32];
|
||||
char os[32];
|
||||
char arch[32];
|
||||
} savegameHeader_t;
|
||||
|
||||
|
||||
/* ========================================================= */
|
||||
|
||||
/*
|
||||
|
@ -147,12 +136,12 @@ typedef struct
|
|||
* to each of the functions
|
||||
* prototyped above.
|
||||
*/
|
||||
functionList_t functionList[] = {
|
||||
static functionList_t functionList[] = {
|
||||
#include "tables/gamefunc_list.h"
|
||||
};
|
||||
|
||||
/*
|
||||
* Prtotypes for forward
|
||||
* Prototypes for forward
|
||||
* declaration for all game
|
||||
* mmove_t functions.
|
||||
*/
|
||||
|
@ -164,12 +153,12 @@ functionList_t functionList[] = {
|
|||
* functions prototyped
|
||||
* above.
|
||||
*/
|
||||
mmoveList_t mmoveList[] = {
|
||||
static mmoveList_t mmoveList[] = {
|
||||
#include "tables/gamemmove_list.h"
|
||||
};
|
||||
|
||||
/*
|
||||
* Fields to be saved
|
||||
* Fields to be saved (used in g_spawn.c)
|
||||
*/
|
||||
field_t fields[] = {
|
||||
#include "tables/fields.h"
|
||||
|
@ -179,7 +168,7 @@ field_t fields[] = {
|
|||
* Level fields to
|
||||
* be saved
|
||||
*/
|
||||
field_t levelfields[] = {
|
||||
static field_t levelfields[] = {
|
||||
#include "tables/levelfields.h"
|
||||
};
|
||||
|
||||
|
@ -187,7 +176,7 @@ field_t levelfields[] = {
|
|||
* Client fields to
|
||||
* be saved
|
||||
*/
|
||||
field_t clientfields[] = {
|
||||
static field_t clientfields[] = {
|
||||
#include "tables/clientfields.h"
|
||||
};
|
||||
|
||||
|
@ -202,56 +191,58 @@ void
|
|||
InitGame(void)
|
||||
{
|
||||
gi.dprintf("Game is starting up.\n");
|
||||
gi.dprintf("Game is %s built on %s.\n", GAMEVERSION, __DATE__);
|
||||
gi.dprintf("Game is %s built on %s.\n", GAMEVERSION, BUILD_DATE);
|
||||
|
||||
gun_x = gi.cvar ("gun_x", "0", 0);
|
||||
gun_y = gi.cvar ("gun_y", "0", 0);
|
||||
gun_z = gi.cvar ("gun_z", "0", 0);
|
||||
sv_rollspeed = gi.cvar ("sv_rollspeed", "200", 0);
|
||||
sv_rollangle = gi.cvar ("sv_rollangle", "2", 0);
|
||||
sv_maxvelocity = gi.cvar ("sv_maxvelocity", "2000", 0);
|
||||
sv_gravity = gi.cvar ("sv_gravity", "800", 0);
|
||||
gun_x = gi.cvar("gun_x", "0", 0);
|
||||
gun_y = gi.cvar("gun_y", "0", 0);
|
||||
gun_z = gi.cvar("gun_z", "0", 0);
|
||||
sv_rollspeed = gi.cvar("sv_rollspeed", "200", 0);
|
||||
sv_rollangle = gi.cvar("sv_rollangle", "2", 0);
|
||||
sv_maxvelocity = gi.cvar("sv_maxvelocity", "2000", 0);
|
||||
sv_gravity = gi.cvar("sv_gravity", "800", 0);
|
||||
|
||||
/* noset vars */
|
||||
dedicated = gi.cvar ("dedicated", "0", CVAR_NOSET);
|
||||
dedicated = gi.cvar("dedicated", "0", CVAR_NOSET);
|
||||
|
||||
/* latched vars */
|
||||
sv_cheats = gi.cvar ("cheats", "0", CVAR_SERVERINFO|CVAR_LATCH);
|
||||
gi.cvar ("gamename", GAMEVERSION , CVAR_SERVERINFO | CVAR_LATCH);
|
||||
gi.cvar ("gamedate", __DATE__ , CVAR_SERVERINFO | CVAR_LATCH);
|
||||
maxclients = gi.cvar ("maxclients", "4", CVAR_SERVERINFO | CVAR_LATCH);
|
||||
maxspectators = gi.cvar ("maxspectators", "4", CVAR_SERVERINFO);
|
||||
deathmatch = gi.cvar ("deathmatch", "0", CVAR_LATCH);
|
||||
coop = gi.cvar ("coop", "0", CVAR_LATCH);
|
||||
sv_cheats = gi.cvar("cheats", "0", CVAR_SERVERINFO | CVAR_LATCH);
|
||||
gi.cvar("gamename", GAMEVERSION, CVAR_SERVERINFO | CVAR_LATCH);
|
||||
gi.cvar("gamedate", BUILD_DATE, CVAR_SERVERINFO | CVAR_LATCH);
|
||||
maxclients = gi.cvar("maxclients", "4", CVAR_SERVERINFO | CVAR_LATCH);
|
||||
maxspectators = gi.cvar("maxspectators", "4", CVAR_SERVERINFO);
|
||||
deathmatch = gi.cvar("deathmatch", "0", CVAR_LATCH);
|
||||
coop = gi.cvar("coop", "0", CVAR_LATCH);
|
||||
coop_pickup_weapons = gi.cvar("coop_pickup_weapons", "1", CVAR_ARCHIVE);
|
||||
coop_elevator_delay = gi.cvar("coop_elevator_delay", "1.0", CVAR_ARCHIVE);
|
||||
coop_pickup_weapons = gi.cvar("coop_pickup_weapons", "0", CVAR_ARCHIVE);
|
||||
skill = gi.cvar ("skill", "1", CVAR_LATCH);
|
||||
maxentities = gi.cvar ("maxentities", "1024", CVAR_LATCH);
|
||||
g_footsteps = gi.cvar ("g_footsteps", "1", CVAR_ARCHIVE);
|
||||
skill = gi.cvar("skill", "1", CVAR_LATCH);
|
||||
maxentities = gi.cvar("maxentities", "1024", CVAR_LATCH);
|
||||
g_footsteps = gi.cvar("g_footsteps", "1", CVAR_ARCHIVE);
|
||||
g_monsterfootsteps = gi.cvar("g_monsterfootsteps", "0", CVAR_ARCHIVE);
|
||||
g_fix_triggered = gi.cvar ("g_fix_triggered", "0", 0);
|
||||
g_commanderbody_nogod = gi.cvar("g_commanderbody_nogod", "0", CVAR_ARCHIVE);
|
||||
|
||||
/* change anytime vars */
|
||||
dmflags = gi.cvar ("dmflags", "0", CVAR_SERVERINFO);
|
||||
fraglimit = gi.cvar ("fraglimit", "0", CVAR_SERVERINFO);
|
||||
timelimit = gi.cvar ("timelimit", "0", CVAR_SERVERINFO);
|
||||
password = gi.cvar ("password", "", CVAR_USERINFO);
|
||||
spectator_password = gi.cvar ("spectator_password", "", CVAR_USERINFO);
|
||||
needpass = gi.cvar ("needpass", "0", CVAR_SERVERINFO);
|
||||
filterban = gi.cvar ("filterban", "1", 0);
|
||||
g_select_empty = gi.cvar ("g_select_empty", "0", CVAR_ARCHIVE);
|
||||
run_pitch = gi.cvar ("run_pitch", "0.002", 0);
|
||||
run_roll = gi.cvar ("run_roll", "0.005", 0);
|
||||
bob_up = gi.cvar ("bob_up", "0.005", 0);
|
||||
bob_pitch = gi.cvar ("bob_pitch", "0.002", 0);
|
||||
bob_roll = gi.cvar ("bob_roll", "0.002", 0);
|
||||
dmflags = gi.cvar("dmflags", "0", CVAR_SERVERINFO);
|
||||
fraglimit = gi.cvar("fraglimit", "0", CVAR_SERVERINFO);
|
||||
timelimit = gi.cvar("timelimit", "0", CVAR_SERVERINFO);
|
||||
password = gi.cvar("password", "", CVAR_USERINFO);
|
||||
spectator_password = gi.cvar("spectator_password", "", CVAR_USERINFO);
|
||||
needpass = gi.cvar("needpass", "0", CVAR_SERVERINFO);
|
||||
filterban = gi.cvar("filterban", "1", 0);
|
||||
g_select_empty = gi.cvar("g_select_empty", "0", CVAR_ARCHIVE);
|
||||
run_pitch = gi.cvar("run_pitch", "0.002", 0);
|
||||
run_roll = gi.cvar("run_roll", "0.005", 0);
|
||||
bob_up = gi.cvar("bob_up", "0.005", 0);
|
||||
bob_pitch = gi.cvar("bob_pitch", "0.002", 0);
|
||||
bob_roll = gi.cvar("bob_roll", "0.002", 0);
|
||||
|
||||
/* flood control */
|
||||
flood_msgs = gi.cvar ("flood_msgs", "4", 0);
|
||||
flood_persecond = gi.cvar ("flood_persecond", "4", 0);
|
||||
flood_waitdelay = gi.cvar ("flood_waitdelay", "10", 0);
|
||||
flood_msgs = gi.cvar("flood_msgs", "4", 0);
|
||||
flood_persecond = gi.cvar("flood_persecond", "4", 0);
|
||||
flood_waitdelay = gi.cvar("flood_waitdelay", "10", 0);
|
||||
|
||||
/* dm map list */
|
||||
sv_maplist = gi.cvar ("sv_maplist", "", 0);
|
||||
sv_maplist = gi.cvar("sv_maplist", "", 0);
|
||||
|
||||
/* others */
|
||||
aimfix = gi.cvar("aimfix", "0", CVAR_ARCHIVE);
|
||||
|
@ -259,21 +250,21 @@ InitGame(void)
|
|||
g_swap_speed = gi.cvar("g_swap_speed", "1", 0);
|
||||
|
||||
/* items */
|
||||
InitItems ();
|
||||
InitItems();
|
||||
|
||||
game.helpmessage1[0] = 0;
|
||||
game.helpmessage2[0] = 0;
|
||||
|
||||
/* initialize all entities for this game */
|
||||
game.maxentities = maxentities->value;
|
||||
g_edicts = gi.TagMalloc (game.maxentities * sizeof(g_edicts[0]), TAG_GAME);
|
||||
g_edicts = gi.TagMalloc(game.maxentities * sizeof(g_edicts[0]), TAG_GAME);
|
||||
globals.edicts = g_edicts;
|
||||
globals.max_edicts = game.maxentities;
|
||||
|
||||
/* initialize all clients for this game */
|
||||
game.maxclients = maxclients->value;
|
||||
game.clients = gi.TagMalloc (game.maxclients * sizeof(game.clients[0]), TAG_GAME);
|
||||
globals.num_edicts = game.maxclients+1;
|
||||
game.clients = gi.TagMalloc(game.maxclients * sizeof(game.clients[0]), TAG_GAME);
|
||||
globals.num_edicts = game.maxclients + 1;
|
||||
}
|
||||
|
||||
/* ========================================================= */
|
||||
|
@ -545,7 +536,6 @@ WriteField2(FILE *f, field_t *field, byte *base)
|
|||
if (*(byte **)p)
|
||||
{
|
||||
mmove = GetMmoveByAddress (*(mmove_t **)p);
|
||||
|
||||
if (!mmove)
|
||||
{
|
||||
gi.error ("WriteField2: mmove not in list, can't save game");
|
||||
|
@ -659,7 +649,7 @@ ReadField(FILE *f, field_t *field, byte *base)
|
|||
if (len > sizeof(funcStr))
|
||||
{
|
||||
gi.error ("ReadField: function name is longer than buffer (%i chars)",
|
||||
(int)sizeof(funcStr));
|
||||
(int)sizeof(funcStr));
|
||||
}
|
||||
|
||||
fread (funcStr, len, 1, f);
|
||||
|
@ -683,7 +673,7 @@ ReadField(FILE *f, field_t *field, byte *base)
|
|||
if (len > sizeof(funcStr))
|
||||
{
|
||||
gi.error ("ReadField: mmove name is longer than buffer (%i chars)",
|
||||
(int)sizeof(funcStr));
|
||||
(int)sizeof(funcStr));
|
||||
}
|
||||
|
||||
fread (funcStr, len, 1, f);
|
||||
|
@ -758,10 +748,10 @@ ReadClient(FILE *f, gclient_t *client, short save_ver)
|
|||
|
||||
/*
|
||||
* Writes the game struct into
|
||||
* a file. This is called when
|
||||
* ever the games goes to e new
|
||||
* level or the user saves the
|
||||
* game. Saved informations are:
|
||||
* a file. This is called whenever
|
||||
* the game goes to a new level or
|
||||
* the user saves the game. The saved
|
||||
* information consists of:
|
||||
* - cross level data
|
||||
* - client states
|
||||
* - help computer info
|
||||
|
@ -778,7 +768,7 @@ WriteGame(const char *filename, qboolean autosave)
|
|||
SaveClientData();
|
||||
}
|
||||
|
||||
f = fopen(filename, "wb");
|
||||
f = Q_fopen(filename, "wb");
|
||||
|
||||
if (!f)
|
||||
{
|
||||
|
@ -823,7 +813,7 @@ ReadGame(const char *filename)
|
|||
|
||||
gi.FreeTags(TAG_GAME);
|
||||
|
||||
f = fopen(filename, "rb");
|
||||
f = Q_fopen(filename, "rb");
|
||||
|
||||
if (!f)
|
||||
{
|
||||
|
@ -841,6 +831,8 @@ ReadGame(const char *filename)
|
|||
{"YQ2-2", 2},
|
||||
{"YQ2-3", 3},
|
||||
{"YQ2-4", 4},
|
||||
{"YQ2-5", 5},
|
||||
{"YQ2-6", 6},
|
||||
};
|
||||
|
||||
for (i=0; i < sizeof(version_mappings)/sizeof(version_mappings[0]); ++i)
|
||||
|
@ -862,12 +854,12 @@ ReadGame(const char *filename)
|
|||
if (strcmp(sv.game, GAMEVERSION) != 0)
|
||||
{
|
||||
fclose(f);
|
||||
gi.error("Savegame from an other game.so.\n");
|
||||
gi.error("Savegame from another game.so.\n");
|
||||
}
|
||||
else if (strcmp(sv.os, YQ2OSTYPE_1) != 0)
|
||||
else if (strcmp(sv.os, OSTYPE_1) != 0)
|
||||
{
|
||||
fclose(f);
|
||||
gi.error("Savegame from an other os.\n");
|
||||
gi.error("Savegame from another os.\n");
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
|
@ -878,7 +870,7 @@ ReadGame(const char *filename)
|
|||
gi.error("Savegame from another architecture.\n");
|
||||
}
|
||||
#else
|
||||
if (strcmp(sv.arch, YQ2ARCH_1) != 0)
|
||||
if (strcmp(sv.arch, ARCH_1) != 0)
|
||||
{
|
||||
fclose(f);
|
||||
gi.error("Savegame from another architecture.\n");
|
||||
|
@ -961,7 +953,7 @@ WriteEdict(FILE *f, edict_t *ent)
|
|||
}
|
||||
|
||||
/*
|
||||
* Helper fcuntion to write the
|
||||
* Helper function to write the
|
||||
* level local data into a file.
|
||||
* Called by WriteLevel.
|
||||
*/
|
||||
|
@ -1001,7 +993,7 @@ WriteLevel(const char *filename)
|
|||
edict_t *ent;
|
||||
FILE *f;
|
||||
|
||||
f = fopen(filename, "wb");
|
||||
f = Q_fopen(filename, "wb");
|
||||
|
||||
if (!f)
|
||||
{
|
||||
|
@ -1077,10 +1069,10 @@ ReadLevelLocals(FILE *f)
|
|||
|
||||
/*
|
||||
* Reads a level back into the memory.
|
||||
* SpawnEntities were allready called
|
||||
* SpawnEntities were already called
|
||||
* in the same way when the level was
|
||||
* saved. All world links were cleared
|
||||
* befor this function was called. When
|
||||
* before this function was called. When
|
||||
* this function is called, no clients
|
||||
* are connected to the server.
|
||||
*/
|
||||
|
@ -1092,7 +1084,7 @@ ReadLevel(const char *filename)
|
|||
int i;
|
||||
edict_t *ent;
|
||||
|
||||
f = fopen(filename, "rb");
|
||||
f = Q_fopen(filename, "rb");
|
||||
|
||||
if (!f)
|
||||
{
|
56
src/xatrix/savegame/savegame.h
Normal file
56
src/xatrix/savegame/savegame.h
Normal file
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* Copyright (C) 1997-2001 Id Software, Inc.
|
||||
* Copyright (C) 2011 Knightmare
|
||||
* Copyright (C) 2011 Yamagi Burmeister
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
#ifndef SAVEGAME_LOCAL_H
|
||||
#define SAVEGAME_LOCAL_H
|
||||
|
||||
/*
|
||||
* Connects a human readable
|
||||
* function signature with
|
||||
* the corresponding pointer
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
char *funcStr;
|
||||
byte *funcPtr;
|
||||
} functionList_t;
|
||||
|
||||
/*
|
||||
* Connects a human readable
|
||||
* mmove_t string with the
|
||||
* corresponding pointer
|
||||
* */
|
||||
typedef struct
|
||||
{
|
||||
char *mmoveStr;
|
||||
mmove_t *mmovePtr;
|
||||
} mmoveList_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char ver[32];
|
||||
char game[32];
|
||||
char os[32];
|
||||
char arch[32];
|
||||
} savegameHeader_t;
|
||||
|
||||
#endif /* SAVEGAME_LOCAL_H */
|
|
@ -1,9 +1,24 @@
|
|||
/*
|
||||
* Copyright (C) 1997-2001 Id Software, Inc.
|
||||
* Copyright (C) 2011 Yamagi Burmeister
|
||||
* Copyright (c) ZeniMax Media Inc.
|
||||
* Licensed under the GNU General Public License 2.0.
|
||||
*/
|
||||
|
||||
/*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* =======================================================================
|
||||
*
|
||||
* Prototypes for every function in the game.so.
|
||||
|
@ -29,16 +44,19 @@ extern mmoveList_t * GetMmoveByAddress ( mmove_t * adr ) ;
|
|||
extern byte * FindFunctionByName ( char * name ) ;
|
||||
extern functionList_t * GetFunctionByAddress ( byte * adr ) ;
|
||||
extern void InitGame ( void ) ;
|
||||
extern void Info_SetValueForKey ( char * s , char * key , char * value ) ;
|
||||
extern qboolean Info_Validate ( char * s ) ;
|
||||
extern void Info_RemoveKey ( char * s , char * key ) ;
|
||||
extern char * Info_ValueForKey ( char * s , char * key ) ;
|
||||
extern void Com_sprintf ( char * dest , int size , char * fmt , ... ) ;
|
||||
extern int Q_strcasecmp ( char * s1 , char * s2 ) ;
|
||||
extern int Q_strncasecmp ( char * s1 , char * s2 , int n ) ;
|
||||
extern void Info_SetValueForKey ( char * s , const char * key , const char * value ) ;
|
||||
extern qboolean Info_Validate ( const char * s ) ;
|
||||
extern void Info_RemoveKey ( char * s , const char * key ) ;
|
||||
extern char * Info_ValueForKey ( char * s , const char * key ) ;
|
||||
extern int Q_strlcat ( char * dst , const char * src , int size ) ;
|
||||
extern int Q_strlcpy ( char * dst , const char * src , int size ) ;
|
||||
extern char * Q_strlwr ( char * s ) ;
|
||||
extern void Com_sprintf ( char * dest , int size , const char * fmt , ... ) ;
|
||||
extern int Q_strcasecmp ( const char * s1 , const char * s2 ) ;
|
||||
extern int Q_strncasecmp ( const char * s1 , const char * s2 , int n ) ;
|
||||
extern int Q_stricmp ( const char * s1 , const char * s2 ) ;
|
||||
extern void Com_PageInMemory ( byte * buffer , int size ) ;
|
||||
extern char * COM_Parse ( char * * data_p ) ;
|
||||
extern void Com_PageInMemory ( const byte * buffer , int size ) ;
|
||||
extern const char * COM_Parse ( char * * data_p ) ;
|
||||
extern char * va ( const char * format , ... ) ;
|
||||
extern void Swap_Init ( void ) ;
|
||||
extern float FloatNoSwap ( float f ) ;
|
||||
|
@ -55,34 +73,35 @@ extern short LittleShort ( short l ) ;
|
|||
extern short BigShort ( short l ) ;
|
||||
extern void COM_DefaultExtension ( char * path , const char * extension ) ;
|
||||
extern void COM_FilePath ( const char * in , char * out ) ;
|
||||
extern void COM_FileBase ( char * in , char * out ) ;
|
||||
extern void COM_FileBase ( const char * in , char * out ) ;
|
||||
extern const char * COM_FileExtension ( const char * in ) ;
|
||||
extern void COM_StripExtension ( char * in , char * out ) ;
|
||||
extern char * COM_SkipPath ( char * pathname ) ;
|
||||
extern void COM_StripExtension ( const char * in , char * out ) ;
|
||||
extern const char * COM_SkipPath ( const char * pathname ) ;
|
||||
extern int Q_log2 ( int val ) ;
|
||||
extern void VectorScale ( vec3_t in , vec_t scale , vec3_t out ) ;
|
||||
extern void VectorScale ( const vec3_t in , vec_t scale , vec3_t out ) ;
|
||||
extern void VectorInverse ( vec3_t v ) ;
|
||||
extern vec_t VectorLength ( vec3_t v ) ;
|
||||
extern void CrossProduct ( vec3_t v1 , vec3_t v2 , vec3_t cross ) ;
|
||||
extern void _VectorCopy ( vec3_t in , vec3_t out ) ;
|
||||
extern void _VectorAdd ( vec3_t veca , vec3_t vecb , vec3_t out ) ;
|
||||
extern void _VectorSubtract ( vec3_t veca , vec3_t vecb , vec3_t out ) ;
|
||||
extern vec_t _DotProduct ( vec3_t v1 , vec3_t v2 ) ;
|
||||
extern void VectorMA ( vec3_t veca , float scale , vec3_t vecb , vec3_t vecc ) ;
|
||||
extern vec_t VectorNormalize2 ( vec3_t v , vec3_t out ) ;
|
||||
extern vec_t VectorLength ( const vec3_t v ) ;
|
||||
extern void CrossProduct ( const vec3_t v1 , const vec3_t v2 , vec3_t cross ) ;
|
||||
extern void _VectorCopy ( const vec3_t in , vec3_t out ) ;
|
||||
extern void _VectorAdd ( const vec3_t veca , const vec3_t vecb , vec3_t out ) ;
|
||||
extern void _VectorSubtract ( const vec3_t veca , const vec3_t vecb , vec3_t out ) ;
|
||||
extern vec_t _DotProduct ( const vec3_t v1 , const vec3_t v2 ) ;
|
||||
extern void VectorMA ( const vec3_t veca , float scale , const vec3_t vecb , vec3_t vecc ) ;
|
||||
extern vec_t VectorNormalize2 ( const vec3_t v , vec3_t out ) ;
|
||||
extern vec_t VectorNormalize ( vec3_t v ) ;
|
||||
extern int VectorCompare ( vec3_t v1 , vec3_t v2 ) ;
|
||||
extern void AddPointToBounds ( vec3_t v , vec3_t mins , vec3_t maxs ) ;
|
||||
extern int VectorCompare ( const vec3_t v1 , const vec3_t v2 ) ;
|
||||
extern void AddPointToBounds ( const vec3_t v , vec3_t mins , vec3_t maxs ) ;
|
||||
extern void ClearBounds ( vec3_t mins , vec3_t maxs ) ;
|
||||
extern int BoxOnPlaneSide2 ( vec3_t emins , vec3_t emaxs , struct cplane_s * p ) ;
|
||||
extern float anglemod ( float a ) ;
|
||||
extern float LerpAngle ( float a2 , float a1 , float frac ) ;
|
||||
extern float Q_fabs ( float f ) ;
|
||||
extern void R_ConcatTransforms ( float in1 [ 3 ] [ 4 ] , float in2 [ 3 ] [ 4 ] , float out [ 3 ] [ 4 ] ) ;
|
||||
extern void R_ConcatRotations ( float in1 [ 3 ] [ 3 ] , float in2 [ 3 ] [ 3 ] , float out [ 3 ] [ 3 ] ) ;
|
||||
extern void R_ConcatTransforms ( const float in1 [ 3 ] [ 4 ] , const float in2 [ 3 ] [ 4 ] , float out [ 3 ] [ 4 ] ) ;
|
||||
extern void R_ConcatRotations ( const float in1 [ 3 ] [ 3 ] , const float in2 [ 3 ] [ 3 ] , float out [ 3 ] [ 3 ] ) ;
|
||||
extern void PerpendicularVector ( vec3_t dst , const vec3_t src ) ;
|
||||
extern void ProjectPointOnPlane ( vec3_t dst , const vec3_t p , const vec3_t normal ) ;
|
||||
extern void AngleVectors ( vec3_t angles , vec3_t forward , vec3_t right , vec3_t up ) ;
|
||||
extern void AngleVectors2 ( const vec3_t value1 , vec3_t angles ) ;
|
||||
extern void AngleVectors ( const vec3_t angles , vec3_t forward , vec3_t right , vec3_t up ) ;
|
||||
extern void RotatePointAroundVector ( vec3_t dst , const vec3_t dir , const vec3_t point , float degrees ) ;
|
||||
extern void Weapon_Trap ( edict_t * ent ) ;
|
||||
extern void weapon_trap_fire ( edict_t * ent , qboolean held ) ;
|
||||
|
@ -122,8 +141,8 @@ extern void NoAmmoWeaponChange ( edict_t * ent ) ;
|
|||
extern void ChangeWeapon ( edict_t * ent ) ;
|
||||
extern qboolean Pickup_Weapon ( edict_t * ent , edict_t * other ) ;
|
||||
extern void PlayerNoise ( edict_t * who , vec3_t where , int type ) ;
|
||||
extern void P_ProjectSource ( edict_t * ent , vec3_t distance , vec3_t forward , vec3_t right , vec3_t result ) ;
|
||||
extern void ClientEndServerFrame ( edict_t * ent ) ;
|
||||
extern void P_ProjectSource(edict_t *ent, vec3_t distance, vec3_t forward, vec3_t right, vec3_t result);
|
||||
extern void G_SetClientFrame ( edict_t * ent ) ;
|
||||
extern void G_SetClientSound ( edict_t * ent ) ;
|
||||
extern void G_SetClientEvent ( edict_t * ent ) ;
|
||||
|
@ -183,10 +202,11 @@ extern void ClientObituary ( edict_t * self , edict_t * inflictor , edict_t * at
|
|||
extern qboolean IsNeutral ( edict_t * ent ) ;
|
||||
extern qboolean IsFemale ( edict_t * ent ) ;
|
||||
extern void player_pain ( edict_t * self , edict_t * other , float kick , int damage ) ;
|
||||
extern void SP_info_player_intermission ( edict_t *ent );
|
||||
extern void SP_info_player_intermission ( edict_t * ent ) ;
|
||||
extern void SP_info_player_coop ( edict_t * self ) ;
|
||||
extern void SP_info_player_deathmatch ( edict_t * self ) ;
|
||||
extern void SP_info_player_start ( edict_t * self ) ;
|
||||
extern void SP_CreateUnnamedSpawn ( edict_t * self ) ;
|
||||
extern void SP_CreateCoopSpots ( edict_t * self ) ;
|
||||
extern void SP_FixCoopSpots ( edict_t * self ) ;
|
||||
extern void SP_monster_tank ( edict_t * self ) ;
|
||||
|
@ -268,6 +288,7 @@ extern void SP_monster_soldier_ss ( edict_t * self ) ;
|
|||
extern void SP_monster_soldier ( edict_t * self ) ;
|
||||
extern void SP_monster_soldier_light ( edict_t * self ) ;
|
||||
extern void SP_monster_soldier_x ( edict_t * self ) ;
|
||||
extern void soldier_footstep( edict_t *self ) ;
|
||||
extern void soldier_die ( edict_t * self , edict_t * inflictor , edict_t * attacker , int damage , vec3_t point ) ;
|
||||
extern void soldier_dead ( edict_t * self ) ;
|
||||
extern void soldier_fire7 ( edict_t * self ) ;
|
||||
|
@ -354,6 +375,7 @@ extern void M_ChangeYaw ( edict_t * ent ) ;
|
|||
extern qboolean SV_movestep ( edict_t * ent , vec3_t move , qboolean relink ) ;
|
||||
extern qboolean M_CheckBottom ( edict_t * ent ) ;
|
||||
extern void SP_monster_medic ( edict_t * self ) ;
|
||||
extern void medic_footstep( edict_t *self ) ;
|
||||
extern qboolean medic_checkattack ( edict_t * self ) ;
|
||||
extern void medic_attack ( edict_t * self ) ;
|
||||
extern void medic_hook_retract ( edict_t * self ) ;
|
||||
|
@ -376,6 +398,7 @@ extern void medic_search ( edict_t * self ) ;
|
|||
extern void medic_idle ( edict_t * self ) ;
|
||||
extern edict_t * medic_FindDeadMonster ( edict_t * self ) ;
|
||||
extern void SP_misc_insane ( edict_t * self ) ;
|
||||
extern void insane_footstep( edict_t *self ) ;
|
||||
extern void insane_die ( edict_t * self , edict_t * inflictor , edict_t * attacker , int damage , vec3_t point ) ;
|
||||
extern void insane_dead ( edict_t * self ) ;
|
||||
extern void insane_stand ( edict_t * self ) ;
|
||||
|
@ -391,6 +414,7 @@ extern void insane_moan ( edict_t * self ) ;
|
|||
extern void insane_shake ( edict_t * self ) ;
|
||||
extern void insane_fist ( edict_t * self ) ;
|
||||
extern void SP_monster_infantry ( edict_t * self ) ;
|
||||
extern void infantry_footstep( edict_t *self ) ;
|
||||
extern void infantry_attack ( edict_t * self ) ;
|
||||
extern void infantry_smack ( edict_t * self ) ;
|
||||
extern void infantry_swing ( edict_t * self ) ;
|
||||
|
@ -425,6 +449,7 @@ extern void hover_reattack ( edict_t * self ) ;
|
|||
extern void hover_search ( edict_t * self ) ;
|
||||
extern void hover_sight ( edict_t * self , edict_t * other ) ;
|
||||
extern void SP_monster_gunner ( edict_t * self ) ;
|
||||
extern void gunner_footstep( edict_t *self ) ;
|
||||
extern void gunner_refire_chain ( edict_t * self ) ;
|
||||
extern void gunner_fire_chain ( edict_t * self ) ;
|
||||
extern void gunner_attack ( edict_t * self ) ;
|
||||
|
@ -447,6 +472,7 @@ extern void gunner_search ( edict_t * self ) ;
|
|||
extern void gunner_sight ( edict_t * self , edict_t * other ) ;
|
||||
extern void gunner_idlesound ( edict_t * self ) ;
|
||||
extern void SP_monster_gladiator ( edict_t * self ) ;
|
||||
extern void gladiator_footstep( edict_t *self ) ;
|
||||
extern void gladiator_die ( edict_t * self , edict_t * inflictor , edict_t * attacker , int damage , vec3_t point ) ;
|
||||
extern void gladiator_dead ( edict_t * self ) ;
|
||||
extern void gladiator_pain ( edict_t * self , edict_t * other , float kick , int damage ) ;
|
||||
|
@ -605,6 +631,7 @@ extern edict_t * fixbot_FindDeadMonster ( edict_t * self ) ;
|
|||
extern float crand ( void ) ;
|
||||
extern void SP_monster_chick_heat ( edict_t * self ) ;
|
||||
extern void SP_monster_chick ( edict_t * self ) ;
|
||||
extern void chick_footstep( edict_t *self ) ;
|
||||
extern void chick_sight ( edict_t * self , edict_t * other ) ;
|
||||
extern void chick_attack ( edict_t * self ) ;
|
||||
extern void chick_melee ( edict_t * self ) ;
|
||||
|
@ -629,6 +656,7 @@ extern void chick_stand ( edict_t * self ) ;
|
|||
extern void chick_fidget ( edict_t * self ) ;
|
||||
extern void ChickMoan ( edict_t * self ) ;
|
||||
extern void SP_monster_brain ( edict_t * self ) ;
|
||||
extern void brain_footstep( edict_t *self ) ;
|
||||
extern void brain_die ( edict_t * self , edict_t * inflictor , edict_t * attacker , int damage , vec3_t point ) ;
|
||||
extern void brain_dead ( edict_t * self ) ;
|
||||
extern void brain_pain ( edict_t * self , edict_t * other , float kick , int damage ) ;
|
||||
|
@ -737,6 +765,7 @@ extern void boss2_firebullet_right ( edict_t * self ) ;
|
|||
extern void Boss2Rocket ( edict_t * self ) ;
|
||||
extern void boss2_search ( edict_t * self ) ;
|
||||
extern void SP_monster_berserk ( edict_t * self ) ;
|
||||
extern void berserk_footstep( edict_t *self ) ;
|
||||
extern void berserk_die ( edict_t * self , edict_t * inflictor , edict_t * attacker , int damage , vec3_t point ) ;
|
||||
extern void berserk_dead ( edict_t * self ) ;
|
||||
extern void berserk_pain ( edict_t * self , edict_t * other , float kick , int damage ) ;
|
||||
|
@ -814,8 +843,8 @@ extern void trigger_monsterjump_touch ( edict_t * self , edict_t * other , cplan
|
|||
extern void SP_trigger_gravity ( edict_t * self ) ;
|
||||
extern void trigger_gravity_touch ( edict_t * self , edict_t * other , cplane_t * plane , csurface_t * surf ) ;
|
||||
extern void SP_trigger_hurt ( edict_t * self ) ;
|
||||
extern void hurt_touch ( edict_t * self , edict_t * other , cplane_t * plane , csurface_t * surf ) ;
|
||||
extern void hurt_use ( edict_t * self , edict_t * other , edict_t * activator ) ;
|
||||
extern void hurt_touch ( edict_t * self , edict_t * other , cplane_t * plane , csurface_t * surf ) ;
|
||||
extern void SP_trigger_push ( edict_t * self ) ;
|
||||
extern void trigger_push_active ( edict_t * self ) ;
|
||||
extern void trigger_push_inactive ( edict_t * self ) ;
|
||||
|
@ -986,6 +1015,7 @@ extern void misc_deadsoldier_die ( edict_t * self , edict_t * inflictor , edict_
|
|||
extern void SP_misc_banner ( edict_t * ent ) ;
|
||||
extern void misc_banner_think ( edict_t * ent ) ;
|
||||
extern void SP_monster_commander_body ( edict_t * self ) ;
|
||||
extern void commander_body_die ( edict_t * self , edict_t * inflictor , edict_t * attacker , int damage , vec3_t point ) ;
|
||||
extern void commander_body_drop ( edict_t * self ) ;
|
||||
extern void commander_body_use ( edict_t * self , edict_t * other , edict_t * activator ) ;
|
||||
extern void commander_body_think ( edict_t * self ) ;
|
||||
|
@ -996,6 +1026,7 @@ extern void misc_easterchick_think ( edict_t * self ) ;
|
|||
extern void SP_misc_eastertank ( edict_t * ent ) ;
|
||||
extern void misc_eastertank_think ( edict_t * self ) ;
|
||||
extern void SP_misc_blackhole ( edict_t * ent ) ;
|
||||
extern void misc_blackhole_transparent ( edict_t * ent ) ;
|
||||
extern void misc_blackhole_think ( edict_t * self ) ;
|
||||
extern void misc_blackhole_use ( edict_t * ent , edict_t * other , edict_t * activator ) ;
|
||||
extern void SP_misc_explobox ( edict_t * self ) ;
|
||||
|
@ -1045,8 +1076,8 @@ extern void CheckNeedPass ( void ) ;
|
|||
extern void EndDMLevel ( void ) ;
|
||||
extern edict_t * CreateTargetChangeLevel ( char * map ) ;
|
||||
extern void ClientEndServerFrames ( void ) ;
|
||||
extern void Com_Printf ( char * msg , ... ) ;
|
||||
extern void Sys_Error ( char * error , ... ) ;
|
||||
extern void Com_Printf ( const char * msg , ... ) ;
|
||||
extern void Sys_Error ( const char * error , ... ) ;
|
||||
extern game_export_t * GetGameAPI ( game_import_t * import ) ;
|
||||
extern void ShutdownGame ( void ) ;
|
||||
extern void SetItemNames ( void ) ;
|
||||
|
@ -1181,7 +1212,7 @@ extern void T_Damage ( edict_t * targ , edict_t * inflictor , edict_t * attacker
|
|||
extern void M_ReactToDamage ( edict_t * targ , edict_t * attacker ) ;
|
||||
extern int CheckArmor ( edict_t * ent , vec3_t point , vec3_t normal , int damage , int te_sparks , int dflags ) ;
|
||||
extern int CheckPowerArmor ( edict_t * ent , vec3_t point , vec3_t normal , int damage , int dflags ) ;
|
||||
extern void SpawnDamage ( int type , vec3_t origin , vec3_t normal , int damage ) ;
|
||||
extern void SpawnDamage ( int type , vec3_t origin , vec3_t normal ) ;
|
||||
extern void Killed ( edict_t * targ , edict_t * inflictor , edict_t * attacker , int damage , vec3_t point ) ;
|
||||
extern qboolean CanDamage ( edict_t * targ , edict_t * inflictor ) ;
|
||||
extern void ClientCommand ( edict_t * ent ) ;
|
||||
|
@ -1215,7 +1246,7 @@ extern void ChasePrev ( edict_t * ent ) ;
|
|||
extern void ChaseNext ( edict_t * ent ) ;
|
||||
extern void UpdateChaseCam ( edict_t * ent ) ;
|
||||
extern void ai_run ( edict_t * self , float dist ) ;
|
||||
extern qboolean ai_checkattack ( edict_t * self , float dist ) ;
|
||||
extern qboolean ai_checkattack ( edict_t * self ) ;
|
||||
extern void ai_run_slide ( edict_t * self , float distance ) ;
|
||||
extern void ai_run_missile ( edict_t * self ) ;
|
||||
extern void ai_run_melee ( edict_t * self ) ;
|
Loading…
Reference in a new issue