次の人生は最後の人生よりも良いでしょうか?
This commit is contained in:
2
Makefile
2
Makefile
@@ -694,8 +694,8 @@ Q3GOBJ_ = \
|
||||
$(B)/baseia/game/g_bot.o \
|
||||
$(B)/baseia/game/g_client.o \
|
||||
$(B)/baseia/game/g_cmds.o \
|
||||
$(B)/baseia/game/g_cmds_cs.o \
|
||||
$(B)/baseia/game/g_cmds_ext.o \
|
||||
$(B)/baseia/game/g_cmds_ia.o \
|
||||
$(B)/baseia/game/g_combat.o \
|
||||
$(B)/baseia/game/g_items.o \
|
||||
$(B)/baseia/game/bg_alloc.o \
|
||||
|
||||
@@ -961,6 +961,10 @@ void ClientThink_real( gentity_t *ent ) {
|
||||
|
||||
client->ps.gravity = g_gravity.value*g_gravityModifier.value;
|
||||
|
||||
if (ent->flags & FL_BOOTS) {
|
||||
client->ps.gravity = g_gravity.value * 0.20;
|
||||
}
|
||||
|
||||
// set speed
|
||||
client->ps.speed = g_speed.value;
|
||||
|
||||
|
||||
@@ -2201,6 +2201,7 @@ commands_t cmds[ ] =
|
||||
|
||||
{ "kill", CMD_TEAM|CMD_LIVING, Cmd_Kill_f },
|
||||
{ "where", 0, Cmd_Where_f },
|
||||
{ "boots", CMD_LIVING, Cmd_Boots_f },
|
||||
|
||||
// game commands
|
||||
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
/*
|
||||
* This file is part of Illusion Arena
|
||||
* Contents of this file were adapted from CorkScrew
|
||||
* Copyright (C) Arjen '[F]irestarter' van der Veen
|
||||
*/
|
||||
|
||||
#include "g_local.h"
|
||||
|
||||
void Cmd_AddItem_f( gentity_t *ent ) {
|
||||
char buffer[1024];
|
||||
char buffer2[48];
|
||||
int len;
|
||||
fileHandle_t f;
|
||||
char filename[MAX_QPATH] = "powerups/";
|
||||
char map[MAX_QPATH];
|
||||
char serverinfo[MAX_INFO_STRING];
|
||||
|
||||
if ( g_cheats.integer == 0 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( trap_Argc() != 2 ) {
|
||||
trap_SendServerCommand( ent-g_entities, va("print \"usage: additem item\nexample: additem item_haste\n\""));
|
||||
return;
|
||||
}
|
||||
|
||||
trap_GetServerinfo( serverinfo, sizeof(serverinfo) );
|
||||
Q_strncpyz( map, Info_ValueForKey( serverinfo, "mapname" ), sizeof(map) );
|
||||
|
||||
strcat(filename, map);
|
||||
strcat(filename, ".txt");
|
||||
|
||||
trap_FS_FOpenFile( filename, &f, FS_APPEND );
|
||||
|
||||
trap_Argv( 1, buffer2, sizeof( buffer2 ) );
|
||||
|
||||
|
||||
if ( ent->s.groundEntityNum ) { // we're on the ground, so spawnflags = 0;
|
||||
Com_sprintf( buffer, sizeof(buffer),
|
||||
"\n\n{\nclassname \"%s\"\norigin \"%i %i %i\"\n}\n",
|
||||
buffer2,
|
||||
(int)ent->s.pos.trBase[0],
|
||||
(int)ent->s.pos.trBase[1],
|
||||
(int)ent->s.pos.trBase[2] );
|
||||
trap_SendServerCommand( ent-g_entities, va("print \"%s added at %s\n\"", buffer2, vtos( ent->s.pos.trBase ) ) );
|
||||
} else {
|
||||
Com_sprintf( buffer, sizeof(buffer),
|
||||
"\n\n{\nclassname \"%s\"\norigin \"%i %i %i\"\nspawnflags \"1\"\n}\n",
|
||||
buffer2,
|
||||
(int)ent->s.pos.trBase[0],
|
||||
(int)ent->s.pos.trBase[1],
|
||||
(int)ent->s.pos.trBase[2] );
|
||||
trap_SendServerCommand( ent-g_entities, va("print \"suspended %s added at %s\n\"", buffer2, vtos( ent->s.pos.trBase ) ) );
|
||||
}
|
||||
|
||||
trap_FS_Write( buffer, strlen( buffer ), f );
|
||||
|
||||
trap_FS_FCloseFile( f );
|
||||
}
|
||||
95
code/game/g_cmds_ia.c
Normal file
95
code/game/g_cmds_ia.c
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* This file is part of Illusion Arena
|
||||
* Contains additional functions adapted from other places
|
||||
* and mods, such as CorkScrew.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "g_local.h"
|
||||
|
||||
/**
|
||||
* Cmd_Boots_f
|
||||
* Enables the player to perform longer jumps on demand
|
||||
* It can be toggled from the console, or bound to a key
|
||||
*
|
||||
* Note: if you use this on a level that already has low gravity
|
||||
* using these will get out of hand.
|
||||
*
|
||||
* @param ent argument of type gentity_t
|
||||
*/
|
||||
|
||||
void Cmd_Boots_f( gentity_t *ent ) {
|
||||
char *msg;
|
||||
ent->flags ^= FL_BOOTS;
|
||||
|
||||
if (!(ent->flags & FL_BOOTS)) {
|
||||
msg = "Anti-gravity boots OFF\n";
|
||||
} else {
|
||||
msg = "Anti-gravity boots ON\n";
|
||||
}
|
||||
|
||||
trap_SendServerCommand( ent-g_entities, va("print \"%s\"", msg));
|
||||
}
|
||||
|
||||
/**
|
||||
* Cmd_AddItem_f
|
||||
* Inserts a power-up on the player's current location at a given map
|
||||
* Adapted from CorkScrew (Firestarter)
|
||||
*
|
||||
* @param ent argument of type gentity_t
|
||||
*/
|
||||
|
||||
void Cmd_AddItem_f( gentity_t *ent ) {
|
||||
char buffer[1024];
|
||||
char buffer2[48];
|
||||
int len;
|
||||
fileHandle_t f;
|
||||
char filename[MAX_QPATH] = "powerups/";
|
||||
char map[MAX_QPATH];
|
||||
char serverinfo[MAX_INFO_STRING];
|
||||
|
||||
if ( g_cheats.integer == 0 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( trap_Argc() != 2 ) {
|
||||
trap_SendServerCommand( ent-g_entities, va("print \"usage: additem item\nexample: additem item_haste\n\""));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
trap_GetServerinfo( serverinfo, sizeof(serverinfo) );
|
||||
Q_strncpyz( map, Info_ValueForKey( serverinfo, "mapname" ), sizeof(map) );
|
||||
|
||||
|
||||
strcat(filename, map);
|
||||
strcat(filename, ".txt");
|
||||
|
||||
trap_FS_FOpenFile( filename, &f, FS_APPEND );
|
||||
|
||||
trap_Argv( 1, buffer2, sizeof( buffer2 ) );
|
||||
|
||||
|
||||
|
||||
if ( ent->s.groundEntityNum ) { // we're on the ground, so spawnflags = 0;
|
||||
Com_sprintf( buffer, sizeof(buffer),
|
||||
"\n\n{\nclassname \"%s\"\norigin \"%i %i %i\"\n}\n",
|
||||
buffer2,
|
||||
(int)ent->s.pos.trBase[0],
|
||||
(int)ent->s.pos.trBase[1],
|
||||
(int)ent->s.pos.trBase[2] );
|
||||
trap_SendServerCommand( ent-g_entities, va("print \"%s added at %s\n\"", buffer2, vtos( ent->s.pos.trBase ) ) );
|
||||
} else {
|
||||
Com_sprintf( buffer, sizeof(buffer),
|
||||
"\n\n{\nclassname \"%s\"\norigin \"%i %i %i\"\nspawnflags \"1\"\n}\n",
|
||||
buffer2,
|
||||
(int)ent->s.pos.trBase[0],
|
||||
(int)ent->s.pos.trBase[1],
|
||||
(int)ent->s.pos.trBase[2] );
|
||||
trap_SendServerCommand( ent-g_entities, va("print \"suspended %s added at %s\n\"", buffer2, vtos( ent->s.pos.trBase ) ) );
|
||||
}
|
||||
|
||||
|
||||
trap_FS_Write( buffer, strlen( buffer ), f );
|
||||
trap_FS_FCloseFile( f );
|
||||
}
|
||||
@@ -57,6 +57,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#define FL_DROPPED_ITEM 0x00001000
|
||||
#define FL_NO_BOTS 0x00002000 // spawn point not for bot use
|
||||
#define FL_NO_HUMANS 0x00004000 // spawn point just for bots
|
||||
#define FL_BOOTS 0x00006000 // anti-gravity boots (Burning)
|
||||
#define FL_FORCE_GESTURE 0x00008000 // force gesture on client
|
||||
|
||||
// movers are things like doors, plats, buttons, etc
|
||||
@@ -586,10 +587,6 @@ char *ConcatArgs( int start ); //KK-OAX This declaration moved from g_svccmds.c
|
||||
//KK-OAX Added this to make accessible from g_svcmds_ext.c
|
||||
void G_Say( gentity_t *ent, gentity_t *target, int mode, const char *chatText );
|
||||
|
||||
// Adapted from CorkScrew
|
||||
// g_cmds_cs.c
|
||||
void Cmd_AddItem_f( gentity_t *ent );
|
||||
|
||||
// KK-OAX Added these in a seperate file to keep g_cmds.c familiar.
|
||||
// g_cmds_ext.c
|
||||
//
|
||||
@@ -609,6 +606,12 @@ int G_ClientNumberFromString( char *s );
|
||||
qboolean G_ClientIsLagging( gclient_t *client );
|
||||
void SanitizeString( char *in, char *out );
|
||||
|
||||
//
|
||||
// g_cmds_ia.c
|
||||
//
|
||||
void Cmd_AddItem_f( gentity_t *ent );
|
||||
void Cmd_Boots_f( gentity_t *ent );
|
||||
|
||||
// KK-OAX Added this for common file stuff between Admin and Sprees.
|
||||
// g_fileops.c
|
||||
//
|
||||
|
||||
@@ -69,6 +69,8 @@ static void UI_CreditMenu_Draw( void ) {
|
||||
y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
|
||||
UI_DrawProportionalString( 320, y, "Bishop-333 (OmegA)", UI_CENTER|UI_SMALLFONT, color_white );
|
||||
y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
|
||||
UI_DrawProportionalString( 320, y, "Burning (from Code3Arena)", UI_CENTER|UI_SMALLFONT, color_white );
|
||||
y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
|
||||
UI_DrawProportionalString( 320, y, "id Software for id Tech 3", UI_CENTER|UI_SMALLFONT, color_white );
|
||||
y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
|
||||
UI_DrawProportionalString( 320, y, "Neil \"haste\" Toronto (Alternate Fire, Unlagged)", UI_CENTER|UI_SMALLFONT, color_white );
|
||||
|
||||
Reference in New Issue
Block a user