quake-hipnotic-sdk/progs/amtest.qc

86 lines
1.7 KiB
C++
Raw Normal View History

1997-03-11 00:00:00 +00:00
/*~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>
~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~*/
void() test_teleport_touch;
void() tele_done;
/*quaked test_teleport (0 .5 .8) ?
teleporter testing
*/
void() test_teleport =
{
precache_model ("sprites/s_aball.spr");
setsize (self, self.mins, self.maxs);
self.touch = test_teleport_touch;
self.solid = 1;
if (!self.target)
objerror ("no target\n");
};
void() test_teleport_touch =
{
local entity oldself;
other.movetype = movetype_toss;
// other.solid = solid_not;
other.dest = '256 -128 -128';
oldself = self;
self = other;
// sub_calcmove (self.dest, 200, tele_done);
self.velocity = '1000 0 0 ';
self = oldself;
};
void() tele_done =
{
self.movetype = movetype_walk;
self.solid = solid_slidebox;
};
/*~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>
~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~*/
void() test_goaway;
void() test_spawn;
/*quaked test_fodder (0 .5 .8) ?
beating guy
*/
void() test_fodder =
{
self.nextthink = time + 3;
self.think = test_spawn;
};
void() test_spawn =
{
local entity body;
makevectors (self.angles);
body = spawn();
setmodel (body, "progs/soldier.mdl");
setorigin (body, self.origin);
body.classname = "player";
body.health = 1000;
body.frags = 0;
body.takedamage = damage_aim;
body.solid = solid_slidebox;
body.movetype = movetype_walk;
body.show_hostile = 0;
body.weapon = 1;
body.velocity = v_forward * 200;
body.nextthink = time + 5;
body.think = test_goaway;
self.nextthink = time + 3;
self.think = test_spawn;
};
void() test_goaway =
{
remove (self);
};