mirror of
https://github.com/Q3Rally-Team/q3rally.git
synced 2024-11-25 13:21:08 +00:00
Added target_gravity from EntityPlus
This commit is contained in:
parent
6ad4ac40eb
commit
45f8c08cef
4 changed files with 40 additions and 4 deletions
|
@ -31,7 +31,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
// second version that must match between game and cgame
|
// second version that must match between game and cgame
|
||||||
|
|
||||||
// STONELANCE
|
// STONELANCE
|
||||||
#define GAME_VERSION "Q3Rally v0.0.0.2"
|
#define GAME_VERSION "Q3Rally v0.0.0.3"
|
||||||
// END
|
// END
|
||||||
|
|
||||||
#define DEFAULT_GRAVITY 800
|
#define DEFAULT_GRAVITY 800
|
||||||
|
|
|
@ -164,6 +164,7 @@ void SP_target_kill (gentity_t *ent);
|
||||||
void SP_target_position (gentity_t *ent);
|
void SP_target_position (gentity_t *ent);
|
||||||
void SP_target_location (gentity_t *ent);
|
void SP_target_location (gentity_t *ent);
|
||||||
void SP_target_push (gentity_t *ent);
|
void SP_target_push (gentity_t *ent);
|
||||||
|
void SP_target_gravity (gentity_t *ent);
|
||||||
void SP_target_earthquake (gentity_t *ent);
|
void SP_target_earthquake (gentity_t *ent);
|
||||||
|
|
||||||
void SP_light (gentity_t *self);
|
void SP_light (gentity_t *self);
|
||||||
|
@ -263,6 +264,7 @@ spawn_t spawns[] = {
|
||||||
{"target_position", SP_target_position},
|
{"target_position", SP_target_position},
|
||||||
{"target_location", SP_target_location},
|
{"target_location", SP_target_location},
|
||||||
{"target_push", SP_target_push},
|
{"target_push", SP_target_push},
|
||||||
|
{"target_gravity", SP_target_gravity},
|
||||||
{"target_earthquake", SP_target_earthquake},
|
{"target_earthquake", SP_target_earthquake},
|
||||||
|
|
||||||
{"light", SP_light},
|
{"light", SP_light},
|
||||||
|
|
|
@ -468,6 +468,31 @@ void SP_target_location( gentity_t *self ){
|
||||||
|
|
||||||
//==========================================================
|
//==========================================================
|
||||||
|
|
||||||
|
/*QUAKED target_gravity (.5 .5 .5) (-8 -8 -8) (8 8 8) GLOBAL
|
||||||
|
Sets the gravity of the activator. The gravity is set through the "count" key.
|
||||||
|
If GLOBAL is checked, all players in the game will have their gravity changed.
|
||||||
|
*/
|
||||||
|
void target_gravity_use (gentity_t *self, gentity_t *other, gentity_t *activator) {
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if ( !self->count )
|
||||||
|
self->count = g_gravity.integer;
|
||||||
|
|
||||||
|
if ( (self->spawnflags & 1) )
|
||||||
|
{
|
||||||
|
for (i = 0; i < level.maxclients; i++)
|
||||||
|
{
|
||||||
|
level.clients[i].ps.gravity = self->count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
activator->client->ps.gravity = self->count;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SP_target_gravity (gentity_t *self) {
|
||||||
|
self->use = target_gravity_use;
|
||||||
|
}
|
||||||
|
|
||||||
/*QUAKED target_earthquake (.5 .5 .5) (-8 -8 -8) (8 8 8)
|
/*QUAKED target_earthquake (.5 .5 .5) (-8 -8 -8) (8 8 8)
|
||||||
starts earthquake
|
starts earthquake
|
||||||
"length" - length in seconds (2-32, in steps of 2)
|
"length" - length in seconds (2-32, in steps of 2)
|
||||||
|
|
|
@ -13,7 +13,7 @@ ProjectFilesOnly=0
|
||||||
[Project tree]
|
[Project tree]
|
||||||
q3rallycode
|
q3rallycode
|
||||||
+engine
|
+engine
|
||||||
+code
|
-code
|
||||||
-AL
|
-AL
|
||||||
engine\code\AL\al.h
|
engine\code\AL\al.h
|
||||||
engine\code\AL\alc.h
|
engine\code\AL\alc.h
|
||||||
|
@ -483,7 +483,7 @@ q3rallycode
|
||||||
engine\code\q3_ui\ui_team.c
|
engine\code\q3_ui\ui_team.c
|
||||||
engine\code\q3_ui\ui_teamorders.c
|
engine\code\q3_ui\ui_teamorders.c
|
||||||
engine\code\q3_ui\ui_video.c
|
engine\code\q3_ui\ui_video.c
|
||||||
+qcommon
|
-qcommon
|
||||||
engine\code\qcommon\cm_load.c
|
engine\code\qcommon\cm_load.c
|
||||||
engine\code\qcommon\cm_local.h
|
engine\code\qcommon\cm_local.h
|
||||||
engine\code\qcommon\cm_patch.c
|
engine\code\qcommon\cm_patch.c
|
||||||
|
@ -852,15 +852,24 @@ q3rallycode
|
||||||
engine\README
|
engine\README
|
||||||
engine\TODO
|
engine\TODO
|
||||||
engine\voip-readme.txt
|
engine\voip-readme.txt
|
||||||
|
engine\resync_svn.sh
|
||||||
[Open project files]
|
[Open project files]
|
||||||
0=engine\code\cgame\cg_ents.c
|
0=engine\code\cgame\cg_ents.c
|
||||||
1=engine\code\qcommon\files.c
|
1=engine\code\qcommon\files.c
|
||||||
|
2=engine\code\game\bg_public.h
|
||||||
|
3=engine\resync_svn.sh
|
||||||
[Selected Project Files]
|
[Selected Project Files]
|
||||||
Main=
|
Main=
|
||||||
Selected=engine\code\qcommon\files.c
|
Selected=engine\code\cgame\cg_ents.c
|
||||||
[engine\code\cgame\cg_ents.c]
|
[engine\code\cgame\cg_ents.c]
|
||||||
TopLine=121
|
TopLine=121
|
||||||
Caret=1,1
|
Caret=1,1
|
||||||
[engine\code\qcommon\files.c]
|
[engine\code\qcommon\files.c]
|
||||||
TopLine=177
|
TopLine=177
|
||||||
Caret=34,201
|
Caret=34,201
|
||||||
|
[engine\code\game\bg_public.h]
|
||||||
|
TopLine=1
|
||||||
|
Caret=50,34
|
||||||
|
[engine\resync_svn.sh]
|
||||||
|
TopLine=386
|
||||||
|
Caret=1,1
|
||||||
|
|
Loading…
Reference in a new issue