summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/g_target.c4
-rw-r--r--src/game/g_trigger.c4
2 files changed, 6 insertions, 2 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;
}
diff --git a/src/game/g_trigger.c b/src/game/g_trigger.c
index caed1d75..267bcad7 100644
--- a/src/game/g_trigger.c
+++ b/src/game/g_trigger.c
@@ -295,7 +295,7 @@ void trigger_teleporter_touch( gentity_t *self, gentity_t *other, trace_t *trace
return;
}
- TeleportPlayer( other, dest->s.origin, dest->s.angles, 400.0f );
+ TeleportPlayer( other, dest->s.origin, dest->s.angles, self->speed );
}
/*
@@ -321,6 +321,8 @@ void SP_trigger_teleport( gentity_t *self )
{
InitTrigger( self );
+ G_SpawnFloat( "speed", "400", &self->speed );
+
// unlike other triggers, we need to send this one to the client
// unless is a spectator trigger
if( self->spawnflags & 1 )