This repository has been archived by the owner on May 4, 2022. It is now read-only.
forked from FWGS/hlsdk-portable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
progdefs.h
218 lines (181 loc) · 4.74 KB
/
progdefs.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
* object code is restricted to non-commercial enhancements to products from
* Valve LLC. All other use, distribution, or modification is prohibited
* without written permission from Valve LLC.
*
****/
#pragma once
#if !defined(PROGDEFS_H)
#define PROGDEFS_H
typedef struct
{
float time;
float frametime;
float force_retouch;
string_t mapname;
string_t startspot;
float deathmatch;
float coop;
float teamplay;
float serverflags;
float found_secrets;
vec3_t v_forward;
vec3_t v_up;
vec3_t v_right;
float trace_allsolid;
float trace_startsolid;
float trace_fraction;
vec3_t trace_endpos;
vec3_t trace_plane_normal;
float trace_plane_dist;
edict_t *trace_ent;
float trace_inopen;
float trace_inwater;
int trace_hitgroup;
int trace_flags;
int changelevel; // transition in progress when true (was msg_entity)
int cdAudioTrack;
int maxClients;
int maxEntities;
const char *pStringBase;
void *pSaveData; // (SAVERESTOREDATA *) pointer
vec3_t vecLandmarkOffset;
} globalvars_t;
typedef struct entvars_s
{
string_t classname;
string_t globalname;
vec3_t origin;
vec3_t oldorigin;
vec3_t velocity;
vec3_t basevelocity;
vec3_t clbasevelocity; // Base velocity that was passed in to server physics so
// client can predict conveyors correctly. Server zeroes it, so we need to store here, too.
vec3_t movedir;
vec3_t angles; // Model angles
vec3_t avelocity; // angle velocity (degrees per second)
vec3_t punchangle; // auto-decaying view angle adjustment
vec3_t v_angle; // Viewing angle (player only)
// For parametric entities
vec3_t endpos;
vec3_t startpos;
float impacttime;
float starttime;
int fixangle; // 0:nothing, 1:force view angles, 2:add avelocity
float idealpitch;
float pitch_speed;
float ideal_yaw;
float yaw_speed;
int modelindex;
string_t model;
int viewmodel; // player's viewmodel
int weaponmodel; // what other players see
vec3_t absmin; // BB max translated to world coord
vec3_t absmax; // BB max translated to world coord
vec3_t mins; // local BB min
vec3_t maxs; // local BB max
vec3_t size; // maxs - mins
float ltime;
float nextthink;
int movetype;
int solid;
int skin;
int body; // sub-model selection for studiomodels
int effects;
float gravity; // % of "normal" gravity
float friction; // inverse elasticity of MOVETYPE_BOUNCE
int light_level;
int sequence; // animation sequence
int gaitsequence; // movement animation sequence for player (0 for none)
float frame; // % playback position in animation sequences (0..255)
float animtime; // world time when frame was set
float framerate; // animation playback rate (-8x to 8x)
byte controller[4]; // bone controller setting (0..255)
byte blending[2]; // blending amount between sub-sequences (0..255)
float scale; // sprites and models rendering scale (0..255)
int rendermode;
float renderamt;
vec3_t rendercolor;
int renderfx;
float health;
float frags;
int weapons; // bit mask for available weapons
float takedamage;
int deadflag;
vec3_t view_ofs; // eye position
int button;
int impulse;
edict_t *chain; // Entity pointer when linked into a linked list
edict_t *dmg_inflictor;
edict_t *enemy;
edict_t *aiment; // entity pointer when MOVETYPE_FOLLOW
edict_t *owner;
edict_t *groundentity;
int spawnflags;
int flags;
int colormap; // lowbyte topcolor, highbyte bottomcolor
int team;
float max_health;
float teleport_time;
float armortype;
float armorvalue;
int waterlevel;
int watertype;
string_t target;
string_t targetname;
string_t netname;
string_t message;
float dmg_take;
float dmg_save;
float dmg;
float dmgtime;
string_t noise;
string_t noise1;
string_t noise2;
string_t noise3;
float speed;
float air_finished;
float pain_finished;
float radsuit_finished;
edict_t *pContainingEntity;
int playerclass;
float maxspeed;
float fov;
int weaponanim;
int pushmsec;
int bInDuck;
int flTimeStepSound;
int flSwimTime;
int flDuckTime;
int iStepLeft;
float flFallVelocity;
int gamestate;
int oldbuttons;
int groupinfo;
// For mods
int iuser1;
int iuser2;
int iuser3;
int iuser4;
float fuser1;
float fuser2;
float fuser3;
float fuser4;
vec3_t vuser1;
vec3_t vuser2;
vec3_t vuser3;
vec3_t vuser4;
edict_t *euser1;
edict_t *euser2;
edict_t *euser3;
edict_t *euser4;
} entvars_t;
#endif//PROGDEFS_H