forked from haithun/CoD4X17a_testing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
g_sv_shared.h
98 lines (78 loc) · 3.92 KB
/
g_sv_shared.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/*
===========================================================================
Copyright (C) 2010-2013 Ninja and TheKelm of the IceOps-Team
Copyright (C) 1999-2005 Id Software, Inc.
This file is part of CoD4X17a-Server source code.
CoD4X17a-Server source code is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
CoD4X17a-Server source code 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 Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
===========================================================================
*/
#ifndef __G_SV_SHARED_H__
#define __G_SV_SHARED_H__
#include "q_math.h"
#include "q_shared.h"
#include "entity.h"
#include "cvar.h"
#include "server.h"
void Init_CallVote(void);
__cdecl void Cmd_CallVote_f( gentity_t *ent );
void G_ChatRedirect(char* msg, int client, int mode);
void G_AddChatRedirect(void (*rd_dest)( const char *, int, int));
qboolean Cmd_FollowClient_f(gentity_t *ent, int clientnum);
__cdecl void StopFollowingOnDeath( gentity_t *ent );
__cdecl void G_Say( gentity_t *ent, gentity_t *target, int mode, const char *chatText );
__cdecl void ExitLevel( void );
void G_RegisterCvarsCallback( );
void QDECL G_LogPrintf( const char *fmt, ... );
void __cdecl StopFollowing( gentity_t* ent );
void __regparm3 G_SayTo(gentity_t *ent, gentity_t *other, int mode, int color, const char* teamname, const char* name, const char *message);
__cdecl void GScr_LoadScripts(void);
//This defines Cvars directly related to executable file
#define getcvaradr(adr) ((cvar_t*)(*(int*)(adr)))
#define g_gametype getcvaradr(0x13ed89bc)
#define g_gravity getcvaradr(0x84bcff4)
#define g_TeamName_Allies getcvaradr(0x84bd090)
#define g_TeamName_Axis getcvaradr(0x84bd094)
#define g_maxclients getcvaradr(0x84bcfe8)
extern cvar_t* g_speed;
void __cdecl SV_GameSendServerCommand(int clientnum, int svscmd_type, const char *text);
//tSV_GameSendServerCommand SV_GameSendServerCommand = (tSV_GameSendServerCommand)(0x817ce42);
void G_ShowMotd(unsigned int clnum);
void QDECL G_LogPrintf( const char *fmt, ... );
void G_PrintRedirect(char* msg, int len);
void G_PrintAddRedirect(void (*rd_dest)( const char *, int));
__cdecl void ClientSpawn(gentity_t* ent, vec3_t* px, vec3_t* py);
__cdecl void ClientUserinfoChanged( int clientNum );
void Pmove_ExtendedResetState( void );
void Pmove_ExtendedInitForClient(client_t *cl);
void Pmove_ExtendedTurnOn( void );
__cdecl __optimize3 int Pmove_GetSpeed( playerState_t *ps );
__cdecl __optimize3 int Pmove_GetGravity( playerState_t *ps );
__cdecl __optimize3 float Jump_GetHeight( playerState_t *ps);
__cdecl __optimize3 void Jump_ClampVelocity(playerState_t* ps, vec3_t vec);
__cdecl __optimize3 qboolean Jump_IsPlayerAboveMax(playerState_t* ps);
__cdecl __optimize3 qboolean Jump_GetStepHeight(playerState_t* ps, const vec3_t vec1, float* val2);
__cdecl __optimize3 float Jump_CalcHeight( playerState_t* ps );
__cdecl __optimize3 void StuckInClient( gentity_t* gen );
void __cdecl G_RunFrame( int time );
int __cdecl G_LocalizedStringIndex( const char* );
void __cdecl ClientCommand( int );
const char* __cdecl ClientConnect(int clnum, short clscriptid); //Something simular to VM_Call
void __cdecl ClientBegin( int clientNum );
void G_PrintRuleForPlayer(client_t *cl);
void G_PrintAdvertForPlayer(client_t *cl);
void G_SetupHudMessagesForPlayer(client_t* cl);
void G_DestroyAdsForPlayer(client_t *cl);
void G_AddRule(const char* newtext);
void G_AddAdvert(const char* newtext);
void G_InitMotd();
void G_ClearAllMessages();
#endif