Skip to content

Commit

Permalink
expand(1)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobSis committed Mar 2, 2013
1 parent 0951f0f commit c3c0731
Show file tree
Hide file tree
Showing 34 changed files with 10,677 additions and 10,677 deletions.
774 changes: 387 additions & 387 deletions src/ai.qc

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/asstech.qc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ float PELLET_TTL = 20;
void() counter_on_use;
void() counter_off_use;

void() counter_think =
void() counter_think =
{
self.cnt = self.cnt + 1;
if ( self.spawnflags & COUNTER_RANDOM )
Expand Down Expand Up @@ -695,5 +695,5 @@ void () ass_pelletlauncher =
High-Energy Pellet Catcher
*/
//void () ass_pelletcatcher = {
// self.classname = "ass_pelletcatcher";
// self.classname = "ass_pelletcatcher";
//};
538 changes: 269 additions & 269 deletions src/boss.qc

Large diffs are not rendered by default.

172 changes: 86 additions & 86 deletions src/buttons.qc
Original file line number Diff line number Diff line change
Expand Up @@ -5,78 +5,78 @@ void() button_return;

void() button_wait =
{
self.state = STATE_TOP;
self.nextthink = self.ltime + self.wait;
self.think = button_return;
activator = self.enemy;
SUB_UseTargets();
self.frame = 1; // use alternate textures
self.state = STATE_TOP;
self.nextthink = self.ltime + self.wait;
self.think = button_return;
activator = self.enemy;
SUB_UseTargets();
self.frame = 1; // use alternate textures
};

void() button_done =
{
self.state = STATE_BOTTOM;
self.state = STATE_BOTTOM;
};

void() button_return =
{
self.state = STATE_DOWN;
SUB_CalcMove (self.pos1, self.speed, button_done);
self.frame = 0; // use normal textures
if (self.health)
self.takedamage = DAMAGE_YES; // can be shot again
self.state = STATE_DOWN;
SUB_CalcMove (self.pos1, self.speed, button_done);
self.frame = 0; // use normal textures
if (self.health)
self.takedamage = DAMAGE_YES; // can be shot again
};


void() button_blocked =
{ // do nothing, just don't ome all the way back out
{ // do nothing, just don't ome all the way back out
};


void() button_fire =
{
if (self.state == STATE_UP || self.state == STATE_TOP)
return;
if (self.state == STATE_UP || self.state == STATE_TOP)
return;

sound (self, CHAN_VOICE, self.noise, 1, ATTN_NORM);
sound (self, CHAN_VOICE, self.noise, 1, ATTN_NORM);

self.state = STATE_UP;
SUB_CalcMove (self.pos2, self.speed, button_wait);
self.state = STATE_UP;
SUB_CalcMove (self.pos2, self.speed, button_wait);
};


void() button_use =
{
self.enemy = activator;
button_fire ();
self.enemy = activator;
button_fire ();
};

void() button_touch =
{
if (other.classname != "player")
return;
self.enemy = other;
button_fire ();
if (other.classname != "player")
return;
self.enemy = other;
button_fire ();
};

void() button_killed =
{
self.enemy = damage_attacker;
self.health = self.max_health;
self.takedamage = DAMAGE_NO; // wil be reset upon return
button_fire ();
self.enemy = damage_attacker;
self.health = self.max_health;
self.takedamage = DAMAGE_NO; // wil be reset upon return
button_fire ();
};


/*QUAKED func_button (0 .5 .8) ?
When a button is touched, it moves some distance in the direction of it's angle, triggers all of it's targets, waits some time, then returns to it's original position where it can be triggered again.

"angle" determines the opening direction
"target" all entities with a matching targetname will be used
"speed" override the default 40 speed
"wait" override the default 1 second wait (-1 = never return)
"lip" override the default 4 pixel lip remaining at end of move
"health" if set, the button must be killed instead of touched
"angle" determines the opening direction
"target" all entities with a matching targetname will be used
"speed" override the default 40 speed
"wait" override the default 1 second wait (-1 = never return)
"lip" override the default 4 pixel lip remaining at end of move
"health" if set, the button must be killed instead of touched
"sounds"
0) steam metal
1) wooden clunk
Expand All @@ -85,57 +85,57 @@ When a button is touched, it moves some distance in the direction of it's angle,
*/
void() func_button =
{
local float gtemp, ftemp;

if (self.sounds == 0)
{
precache_sound ("buttons/airbut1.wav");
self.noise = "buttons/airbut1.wav";
}
if (self.sounds == 1)
{
precache_sound ("buttons/switch21.wav");
self.noise = "buttons/switch21.wav";
}
if (self.sounds == 2)
{
precache_sound ("buttons/switch02.wav");
self.noise = "buttons/switch02.wav";
}
if (self.sounds == 3)
{
precache_sound ("buttons/switch04.wav");
self.noise = "buttons/switch04.wav";
}
SetMovedir ();

self.movetype = MOVETYPE_PUSH;
self.solid = SOLID_BSP;
setmodel (self, self.model);

self.blocked = button_blocked;
self.use = button_use;

if (self.health)
{
self.max_health = self.health;
self.th_die = button_killed;
self.takedamage = DAMAGE_YES;
}
else
self.touch = button_touch;

if (!self.speed)
self.speed = 40;
if (!self.wait)
self.wait = 1;
if (!self.lip)
self.lip = 4;

self.state = STATE_BOTTOM;

self.pos1 = self.origin;
self.pos2 = self.pos1 + self.movedir*(fabs(self.movedir*self.size) - self.lip);
local float gtemp, ftemp;

if (self.sounds == 0)
{
precache_sound ("buttons/airbut1.wav");
self.noise = "buttons/airbut1.wav";
}
if (self.sounds == 1)
{
precache_sound ("buttons/switch21.wav");
self.noise = "buttons/switch21.wav";
}
if (self.sounds == 2)
{
precache_sound ("buttons/switch02.wav");
self.noise = "buttons/switch02.wav";
}
if (self.sounds == 3)
{
precache_sound ("buttons/switch04.wav");
self.noise = "buttons/switch04.wav";
}
SetMovedir ();

self.movetype = MOVETYPE_PUSH;
self.solid = SOLID_BSP;
setmodel (self, self.model);

self.blocked = button_blocked;
self.use = button_use;

if (self.health)
{
self.max_health = self.health;
self.th_die = button_killed;
self.takedamage = DAMAGE_YES;
}
else
self.touch = button_touch;

if (!self.speed)
self.speed = 40;
if (!self.wait)
self.wait = 1;
if (!self.lip)
self.lip = 4;

self.state = STATE_BOTTOM;

self.pos1 = self.origin;
self.pos2 = self.pos1 + self.movedir*(fabs(self.movedir*self.size) - self.lip);
};

Loading

0 comments on commit c3c0731

Please sign in to comment.