Different camera code... hope this doesn't break.

This commit is contained in:
Finny Merrill 2004-02-18 11:00:45 +00:00
parent 99fd7b08e7
commit 99844916bb
2 changed files with 6 additions and 6 deletions

View file

@ -332,7 +332,8 @@ void() MotionSensorTossTouch =
teamsprint(self.real_owner.team_no, self.real_owner, " has built a Motion Sensor.\n");
self.movetype = MOVETYPE_NONE;
setsize (self, '-16 -16 -6', '16 16 10');
self.owner = NIL;
setsize (self, self.mins, self.maxs);
self.solid = SOLID_BBOX;
self.takedamage = DAMAGE_AIM;
sound (self, CHAN_WEAPON, "weapons/guerilla_set.wav", 1, ATTN_NORM);
@ -478,12 +479,11 @@ void() MotionSensorSpawn =
newmis.classname = "building_sensor";
newmis.netname = "motion_sensor";
newmis.origin = self.origin;
newmis.owner = NIL;
newmis.owner = self;
newmis.real_owner = self;
makevectors (self.v_angle);
newmis.avelocity = '0 0 0';
newmis.velocity = v_forward*800 + v_up * 200 + v_right*10 + v_up*10;
newmis.origin += normalize(newmis.velocity) * 20;
setorigin(newmis, newmis.origin);
newmis.angles = '0 0 0';
newmis.angles_y = anglemod(self.angles_y + 180);

View file

@ -234,12 +234,11 @@ void() Security_Camera_Spawn =
newmis.classname = "building_camera";
newmis.netname = "security_camera";
newmis.origin = self.origin;
newmis.owner = NIL;
newmis.owner = self;
newmis.real_owner = self;
makevectors (self.v_angle);
newmis.avelocity = '0 0 0';
newmis.velocity = v_forward*800 + v_up * 200 + v_right*10 + v_up*10;
newmis.origin += (normalize(newmis.velocity) * 20);
setorigin(newmis, newmis.origin);
newmis.angles = '0 0 0';
newmis.angles_y = anglemod(self.angles_y + 180);
@ -268,6 +267,7 @@ void() SecurityCameraTossTouch =
{
if (other || other == self.real_owner)
return;
self.owner = NIL
local integer pc = entpointcontents(self);
if (pc == CONTENTS_SOLID || pc == CONTENTS_SKY)
{
@ -284,7 +284,7 @@ void() SecurityCameraTossTouch =
self.real_owner.option = time + 2; // so ppl cant destroy it for 2 seconds
self.movetype = MOVETYPE_NONE;
setsize (self, '-16 -16 -6', '16 16 10');
setsize (self, newmis.mins, newmis.maxs);
self.solid = SOLID_BBOX;
self.takedamage = DAMAGE_AIM;
sound (self, CHAN_WEAPON, "weapons/guerilla_set.wav", 1, ATTN_NORM);