summaryrefslogtreecommitdiff
path: root/src/game/g_target.c
diff options
context:
space:
mode:
author/dev/humancontroller <devhc@example.com>2014-07-13 16:53:36 +0200
committer/dev/humancontroller <devhc@example.com>2017-03-09 13:51:10 +0100
commite4e1662ce6e1d44f1714a2776791f151334b5bde (patch)
treebd24d9e003688bff8923351261def4605146765f /src/game/g_target.c
parenta284f3aa74fa543ad6384f56779d55a8d96d6a51 (diff)
allow configurable teleporter ejection speed
Diffstat (limited to 'src/game/g_target.c')
-rw-r--r--src/game/g_target.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/game/g_target.c b/src/game/g_target.c
index 057decbb..2ff6ab27 100644
--- a/src/game/g_target.c
+++ b/src/game/g_target.c
@@ -211,7 +211,7 @@ void target_teleporter_use( gentity_t *self, gentity_t *other, gentity_t *activa
return;
}
- TeleportPlayer( activator, dest->s.origin, dest->s.angles, 400.0f );
+ TeleportPlayer( activator, dest->s.origin, dest->s.angles, self->speed );
}
/*QUAKED target_teleporter (1 0 0) (-8 -8 -8) (8 8 8)
@@ -222,6 +222,8 @@ void SP_target_teleporter( gentity_t *self )
if( !self->targetname )
G_Printf( "untargeted %s at %s\n", self->classname, vtos( self->s.origin ) );
+ G_SpawnFloat( "speed", "400", &self->speed );
+
self->use = target_teleporter_use;
}