Moved some functions

This commit is contained in:
Walter Julius Hennecke 2014-03-19 16:32:04 +01:00
parent 3b8451d635
commit a9805d8eac
12 changed files with 431 additions and 444 deletions

View File

@ -8,6 +8,7 @@
#include "g_items.h"
#include "g_combat.h"
#include "g_lua.h"
#include "g_mover.h"
extern void ammo_station_finish_spawning ( gentity_t *self );

View File

@ -6,6 +6,7 @@
#include "g_local.h"
#include "g_client.h"
#include "g_utils.h"
#ifndef min
#define min(a, b) (a) < (b) ? a : b
@ -17,17 +18,16 @@ gentity_t* podium2;
gentity_t* podium3;
void UpdateTournamentInfo(void) {
char msg[AWARDS_MSG_LENGTH];
char msg2[AWARDS_MSG_LENGTH];
char* mvpName = "";
int32_t i = 0;
int32_t j = 0;
int32_t k = 0;
gentity_t* player = NULL;
int32_t playerClientNum = 0;
int32_t n = 0;
char msg[AWARDS_MSG_LENGTH];
char msg2[AWARDS_MSG_LENGTH];
int32_t playerClientNum = 0;
int32_t playerRank = level.numNonSpectatorClients - 1;
int32_t highestTiedRank = 0;
gentity_t* MVP = NULL;
int32_t mvpNum = -1;
int32_t mvpPoints = 0;
int32_t winningCaptures = 0;
@ -35,10 +35,11 @@ void UpdateTournamentInfo(void) {
int32_t winningTeam=0;
int32_t loseCaptures = 0;
int32_t losePoints = 0;
char* mvpName = "";
int32_t secondPlaceTied=0;
gentity_t* MVP = NULL;
gentity_t* player = NULL;
gclient_t* cl = NULL;
gclient_t* cl2= NULL;
int32_t secondPlaceTied=0;
memset(msg, 0, AWARDS_MSG_LENGTH);
memset(msg2, 0, AWARDS_MSG_LENGTH);

View File

@ -3,6 +3,7 @@
#include "g_spawn.h"
#include "g_items.h"
#include "g_combat.h"
#include "g_utils.h"
/**
* \brief A func_breakables health has sunk to or under zero

View File

@ -865,17 +865,6 @@ typedef struct {
//
// g_utils.c
//
/**
* \brief Get the model index for a model.
*
* Get the model index for a model.
*
* \param name the model name
*
* \return the models index
*/
int G_ModelIndex( char* name );
/**
* \brief Get the sound index for a sound.
*
@ -1242,34 +1231,6 @@ int G_GetEntityByBmodel(char* bmodel,list_p entities);
*/
void AddRemap(const char* oldShader, const char* newShader, float timeOffset);
//
// g_mover.c
//
/**
* Run a mover.
*
* \param ent Mover to run.
*/
void G_Mover_Run( gentity_t* ent );
/**
* Touch function for doors.
*
* \param ent The mover.
* \param other The touching entity.
* \param trace A trace.
*/
void G_Mover_TouchDoorTrigger( gentity_t* ent, gentity_t* other, trace_t* trace );
/**
* Use function for binary movers.
*
* \param ent The mover.
* \param other Other entity.
* \param activator Activator.
*/
void G_Mover_UseBinaryMover( gentity_t* ent, gentity_t* other, gentity_t* activator );
//
// g_misc.c
//

View File

@ -14,6 +14,8 @@
#include "g_usable.h"
#include "g_lua.h"
#include "g_missile.h"
#include "g_utils.h"
#include "g_mover.h"
extern void BG_LoadItemNames(void);
extern qboolean BG_ParseRankNames(char* fileName, rankNames_t rankNames[], size_t size);

View File

@ -1,11 +1,12 @@
// Copyright (C) 1999-2000 Id Software, Inc.
//
#include "g_local.h"
#include "g_mover.h"
#include "g_client.h"
#include "g_spawn.h"
#include "g_combat.h"
#include "g_lua.h"
#include "g_utils.h"
extern qboolean G_CallSpawn(gentity_t *ent);

31
code/game/g_mover.h Normal file
View File

@ -0,0 +1,31 @@
#ifndef G_MOVER_H_
#define G_MOVER_H_
#include "g_local.h"
/**
* \brief Run a mover.
*
* \param ent Mover to run.
*/
void G_Mover_Run(gentity_t* ent);
/**
* \brief Touch function for doors.
*
* \param ent The mover.
* \param other The touching entity.
* \param trace A trace.
*/
void G_Mover_TouchDoorTrigger(gentity_t* ent, gentity_t* other, trace_t* trace);
/**
* \brief Use function for binary movers.
*
* \param ent The mover.
* \param other Other entity.
* \param activator Activator.
*/
void G_Mover_UseBinaryMover(gentity_t* ent, gentity_t* other, gentity_t* activator);
#endif /* G_MOVER_H_ */

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,7 @@
#include "g_items.h"
#include "g_logger.h"
#include "g_combat.h"
#include "g_utils.h"
#define ARM_ANGLE_RANGE 60
#define HEAD_ANGLE_RANGE 90

View File

@ -3,6 +3,13 @@
#include "g_local.h"
qboolean G_Utils_LineOfSight( gentity_t* ent1, gentity_t* ent2 ); //Phenix
/**
* \brief Get the model index for a model.
* Get the model index for a model.
*
* \param name the model name
* \return the models index
*/
int32_t G_ModelIndex(char* name);
#endif /* G_UTILS_H_ */

View File

@ -516,6 +516,7 @@
<ClInclude Include="g_lua.h" />
<ClInclude Include="g_main.h" />
<ClInclude Include="g_missile.h" />
<ClInclude Include="g_mover.h" />
<ClInclude Include="g_public.h" />
<ClInclude Include="g_spawn.h" />
<ClInclude Include="g_sql.h" />

View File

@ -530,6 +530,9 @@
<ClInclude Include="..\qcommon\stv_version.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="g_mover.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="game.def">