]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge commit '6f440770dbdb' into atheros/item_keys
authorPrzemysław Grzywacz <nexather@gmail.com>
Tue, 18 Oct 2011 17:38:00 +0000 (19:38 +0200)
committerPrzemysław Grzywacz <nexather@gmail.com>
Tue, 18 Oct 2011 17:38:00 +0000 (19:38 +0200)
1  2 
qcsrc/server/cl_client.qc
qcsrc/server/defs.qh
qcsrc/server/progs.src
qcsrc/server/t_plats.qc

index 60f457362c3786ec39a28241ac1854d5da3f4810,f41503ab09c790131d48727a08a8af085aeca642..9e8539039a307c496a449ca8cac4365f34a45a36
@@@ -118,7 -118,7 +118,7 @@@ void spawnpoint_use(
                self.team = activator.team;
                some_spawn_has_been_used = 1;
        }
- };
+ }
  
  // Returns:
  //   _x: prio (-1 if unusable)
@@@ -153,7 -153,7 +153,7 @@@ vector Spawn_Score(entity spot, entity 
  
        // filter out spots for assault
        if(spot.target != "") {
-               local entity ent;
+               entity ent;
                float good, found;
                ent = find(world, targetname, spot.target);
  
@@@ -224,7 -224,7 +224,7 @@@ float spawn_allbad
  float spawn_allgood;
  entity Spawn_FilterOutBadSpots(entity firstspot, entity playerlist, float mindist, float teamcheck, float anypoint)
  {
-       local entity spot, spotlist, spotlistend;
+       entity spot, spotlist, spotlistend;
        spawn_allgood = TRUE;
        spawn_allbad = TRUE;
  
@@@ -299,7 -299,7 +299,7 @@@ entity Spawn_WeightedPoint(entity first
  {
        // weight of a point: bound(lower, mindisttoplayer, upper)^exponent
        // multiplied by spot.cnt (useful if you distribute many spawnpoints in a small area)
-       local entity spot;
+       entity spot;
  
        RandomSelection_Init();
        for(spot = firstspot; spot; spot = spot.chain)
@@@ -317,9 -317,9 +317,9 @@@ Finds a point to respaw
  */
  entity SelectSpawnPoint (float anypoint)
  {
-       local float teamcheck;
-       local entity firstspot_new;
-       local entity spot, firstspot, playerlist;
+       float teamcheck;
+       entity firstspot_new;
+       entity spot, firstspot, playerlist;
  
        spot = find (world, classname, "testplayerstart");
        if (spot)
@@@ -662,6 -662,7 +662,7 @@@ void PutObserverInServer (void
        
        self.classname = "observer";
        self.iscreature = FALSE;
+       self.damagedbycontents = FALSE;
        self.health = -666;
        self.takedamage = DAMAGE_NO;
        self.solid = SOLID_NOT;
  
  void FixPlayermodel()
  {
-       local string defaultmodel;
-       local float defaultskin, chmdl, oldskin;
-       local vector m1, m2;
+       string defaultmodel;
+       float defaultskin, chmdl, oldskin;
+       vector m1, m2;
  
        defaultmodel = "";
  
@@@ -860,9 -861,6 +861,9 @@@ void PutClientInServer (void
                WriteByte(MSG_ONE, SVC_SETVIEW);
                WriteEntity(MSG_ONE, self);
        }
 +      
 +      // reset player keys
 +      self.itemkeys = 0;
  
        // player is dead and becomes observer
        // FIXME fix LMS scoring for new system
                self.classname = "player";
                self.wasplayer = TRUE;
                self.iscreature = TRUE;
+               self.damagedbycontents = TRUE;
                self.movetype = MOVETYPE_WALK;
                self.solid = SOLID_SLIDEBOX;
                self.dphitcontentsmask = DPCONTENTS_BODY | DPCONTENTS_SOLID;
@@@ -1844,6 -1843,7 +1846,7 @@@ void ClientDisconnect (void
  
        Portal_ClearAll(self);
  
+       RemoveGrapplingHook(self);
        if(self.flagcarried)
                DropFlag(self.flagcarried, world, world);
        if(self.ballcarried && g_nexball)
@@@ -1911,7 -1911,7 +1914,7 @@@ void ChatBubbleThink(
                self.model = self.mdl;
        else
                self.model = "";
- };
+ }
  
  void UpdateChatBubble()
  {
  // added to the model skins
  /*void UpdateColorModHack()
  {
-       local float c;
+       float c;
        c = self.clientcolors & 15;
        // LordHavoc: only bothering to support white, green, red, yellow, blue
             if (!teamplay) self.colormod = '0 0 0';
        else if (c == 12) self.colormod = '1.22 1.22 0.10';
        else if (c == 13) self.colormod = '0.10 0.10 1.73';
        else self.colormod = '1 1 1';
- };*/
+ }*/
  
  .float oldcolormap;
  void respawn(void)
@@@ -2527,16 -2527,16 +2530,16 @@@ float nJoinAllowed(float includeMe) 
                return FALSE; // forced spectators can never join
  
        // TODO simplify this
-       local entity e;
+       entity e;
  
-       local float totalClients;
+       float totalClients;
        FOR_EACH_CLIENT(e)
                totalClients += 1;
  
        if (!autocvar_g_maxplayers)
                return maxclients - totalClients + includeMe;
  
-       local float currentlyPlaying;
+       float currentlyPlaying;
        FOR_EACH_REALPLAYER(e)
                currentlyPlaying += 1;
  
@@@ -2949,14 -2949,14 +2952,14 @@@ void PlayerPreThink (void
  
                self.prevorigin = self.origin;
  
-               if ((self.BUTTON_CROUCH && !self.hook.state) || self.health <= g_bloodloss)
+               if (((self.BUTTON_CROUCH && !self.hook.state) || self.health <= g_bloodloss) && self.animstate_startframe != self.anim_melee_x) // prevent crouching if using melee attack
                {
                        if (!self.crouch)
                        {
                                self.crouch = TRUE;
                                self.view_ofs = PL_CROUCH_VIEW_OFS;
                                setsize (self, PL_CROUCH_MIN, PL_CROUCH_MAX);
-                               setanim(self, self.anim_duck, FALSE, TRUE, TRUE);
+                               // setanim(self, self.anim_duck, FALSE, TRUE, TRUE); // this anim is BROKEN anyway
                        }
                }
                else
diff --combined qcsrc/server/defs.qh
index 5915773ce20c487c51ae519823edabf2bf2eb470,6c37ac92d8b3f1f83436a1264731716c50908dd5..d9b6fec2ecf56b39397503ad43e4f2260e3499b1
@@@ -128,7 -128,7 +128,7 @@@ float maxclients
  .vector anim_die1; // player dies
  .vector anim_die2; // player dies differently
  .vector anim_draw; // player pulls out a weapon
- .vector anim_duck; // player crouches (from idle to duckidle)
// .vector anim_duck; // player crouches (from idle to duckidle)
  .vector anim_duckwalk; // player walking while crouching
  .vector anim_duckjump; // player jumping from a crouch
  .vector anim_duckidle; // player idling while crouching
@@@ -189,6 -189,7 +189,7 @@@ void setanim(entity e, vector anim, flo
  
  .float watersound_finished;
  .float iscreature;
+ .float damagedbycontents;
  .vector oldvelocity;
  
  .float pauseregen_finished;
@@@ -245,17 -246,6 +246,17 @@@ float alreadychangedlevel
  
  .float runes;
  
 +// Keys player is holding
 +.float itemkeys;
 +#define KEYS_GOLD_KEY 1
 +#define KEYS_SILVER_KEY       2
 +// spawnflags require key (for now only func_door)
 +#define SPAWNFLAGS_GOLD_KEY 8
 +#define SPAWNFLAGS_SILVER_KEY 16
 +// message delay for func_door locked by keys and key locks
 +// this field is used on player entities
 +.float key_door_messagetime;
 +
  
  .float version;
  
@@@ -672,4 -662,3 +673,4 @@@ float serverflags
  .float misc_bulletcounter;    // replaces uzi & hlac bullet counter.
  
  void PlayerUseKey();
 +
diff --combined qcsrc/server/progs.src
index 87e66136ad677199293f13235160ddbadd801a1a,3d1e3970a1f34a31fdafda89a5367a8d803c832c..01624a709414a02920347e193c719ca09d8d1d37
@@@ -110,7 -110,6 +110,7 @@@ w_all.q
  t_items.qc
  cl_weapons.qc
  cl_impulse.qc
 +item_key.qc
  
  ent_cs.qc
  
@@@ -169,11 -168,7 +169,7 @@@ target_music.q
  
  ../common/items.qc
  
- monsters/defs.qc
- monsters/fight.qc
- monsters/ai.qc
- monsters/m_monsters.qc
- monsters/monster_zombie.qc
  accuracy.qc
  csqcprojectile.qc
  
@@@ -189,6 -184,7 +185,7 @@@ mutators/base.q
  mutators/gamemode_keyhunt.qc
  mutators/gamemode_freezetag.qc
  mutators/gamemode_keepaway.qc
+ mutators/mutator_invincibleproj.qc
  mutators/mutator_nix.qc
  mutators/mutator_dodging.qc
  mutators/mutator_rocketflying.qc
diff --combined qcsrc/server/t_plats.qc
index e0d1ca6f55882e3dc9954c08986f07cece7e0e30,9ac9df289243bd36ba3028cec515d4f5394117cb..f116e74a1cebf880cf86c1bfd72eae9c09b2ea1b
@@@ -31,8 -31,8 +31,8 @@@ float PLAT_LOW_TRIGGER = 1
  
  void plat_spawn_inside_trigger()
  {
-       local entity trigger;
-       local vector tmin, tmax;
+       entity trigger;
+       vector tmin, tmax;
  
        trigger = spawn();
        trigger.touch = plat_center_touch;
@@@ -58,7 -58,7 +58,7 @@@
        }
  
        setsize (trigger, tmin, tmax);
- };
+ }
  
  void plat_hit_top()
  {
        self.state = 1;
        self.think = plat_go_down;
        self.nextthink = self.ltime + 3;
- };
+ }
  
  void plat_hit_bottom()
  {
        sound (self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTN_NORM);
        self.state = 2;
- };
+ }
  
  void plat_go_down()
  {
        sound (self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_NORM);
        self.state = 3;
        SUB_CalcMove (self.pos2, self.speed, plat_hit_bottom);
- };
+ }
  
  void plat_go_up()
  {
        sound (self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_NORM);
        self.state = 4;
        SUB_CalcMove (self.pos1, self.speed, plat_hit_top);
- };
+ }
  
  void plat_center_touch()
  {
                plat_go_up ();
        else if (self.state == 1)
                self.nextthink = self.ltime + 1;        // delay going down
- };
+ }
  
  void plat_outside_touch()
  {
        self = self.enemy;
        if (self.state == 1)
                plat_go_down ();
- };
+ }
  
  void plat_trigger_use()
  {
        if (self.think)
                return;         // already activated
        plat_go_down();
- };
+ }
  
  
  void plat_crush()
        // plat state already had changed
        // this isn't a bug per se!
      }
- };
+ }
  
  void plat_use()
  {
        if (self.state != 4)
                objerror ("plat_use: not in up state");
        plat_go_down();
- };
+ }
  
  .string sound1, sound2;
  
@@@ -172,7 -172,7 +172,7 @@@ void plat_reset(
        }
  }
  
- void spawnfunc_path_corner() { };
+ void spawnfunc_path_corner() { }
  void spawnfunc_func_plat()
  {
        if (!self.t_length)
  
        self.reset = plat_reset;
        plat_reset();
- };
+ }
  
  
  void() train_next;
@@@ -265,11 -265,11 +265,11 @@@ void train_wait(
        SUB_UseTargets();
        self = oldself;
        self.enemy = world;
- };
+ }
  
  void train_next()
  {
-       local entity targ;
+       entity targ;
        targ = find(world, targetname, self.target);
        self.enemy = targ;
        self.target = targ.target;
  
        if(self.noise != "")
                sound(self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_IDLE);
- };
+ }
  
  void func_train_find()
  {
-       local entity targ;
+       entity targ;
        targ = find(world, targetname, self.target);
        self.target = targ.target;
        if (!self.target)
        setorigin(self, targ.origin - self.mins);
        self.nextthink = self.ltime + 1;
        self.think = train_next;
- };
+ }
  
  /*QUAKED spawnfunc_func_train (0 .5 .8) ?
  Ridable platform, targets spawnfunc_path_corner path to follow.
@@@ -332,7 -332,7 +332,7 @@@ void spawnfunc_func_train(
        self.dmgtime2 = time;
  
        // TODO make a reset function for this one
- };
+ }
  
  void func_rotating_setactive(float astate)
  {
@@@ -408,12 -408,12 +408,12 @@@ void spawnfunc_func_rotating(
        self.think = SUB_Null;
  
        // TODO make a reset function for this one
- };
+ }
  
  .float height;
  void func_bobbing_controller_think()
  {
-       local vector v;
+       vector v;
        self.nextthink = time + 0.1;
        
        if not (self.owner.active == ACTIVE_ACTIVE)
        if(self.owner.classname == "func_bobbing") // don't brake stuff if the func_bobbing was killtarget'ed
                // * 10 so it will arrive in 0.1 sec
                self.owner.velocity = (v - self.owner.origin) * 10;
- };
+ }
  
  /*QUAKED spawnfunc_func_bobbing (0 .5 .8) ? X_AXIS Y_AXIS
  Brush model that moves back and forth on one axis (default Z).
@@@ -441,7 -441,7 +441,7 @@@ dmgtime : See above
  */
  void spawnfunc_func_bobbing()
  {
-       local entity controller;
+       entity controller;
        if (self.noise != "")
        {
                precache_sound(self.noise);
        self.effects |= EF_LOWPRECISION;
  
        // TODO make a reset function for this one
- };
+ }
  
  .float freq;
  void func_pendulum_controller_think()
  {
-       local float v;
+       float v;
        self.nextthink = time + 0.1;
  
        if not (self.owner.active == ACTIVE_ACTIVE)
                // * 10 so it will arrive in 0.1 sec
                self.owner.avelocity_z = (remainder(v - self.owner.angles_z, 360)) * 10;
        }
- };
+ }
  
  void spawnfunc_func_pendulum()
  {
-       local entity controller;
+       entity controller;
        if (self.noise != "")
        {
                precache_sound(self.noise);
        //self.effects |= EF_LOWPRECISION;
  
        // TODO make a reset function for this one
- };
+ }
  
  // button and multiple button
  
@@@ -583,12 -583,12 +583,12 @@@ void button_wait(
        activator = self.enemy;
        SUB_UseTargets();
        self.frame = 1;                 // use alternate textures
- };
+ }
  
  void button_done()
  {
        self.state = STATE_BOTTOM;
- };
+ }
  
  void button_return()
  {
        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 come all the way back out
- };
+ }
  
  
  void button_fire()
  
        self.state = STATE_UP;
        SUB_CalcMove (self.pos2, self.speed, button_wait);
- };
+ }
  
  void button_reset()
  {
@@@ -644,7 -644,7 +644,7 @@@ void button_use(
  
        self.enemy = activator;
        button_fire ();
- };
+ }
  
  void button_touch()
  {
        if (other.owner)
                self.enemy = other.owner;
        button_fire ();
- };
+ }
  
  void button_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
  {
                self.enemy = damage_attacker;
                button_fire ();
        }
- };
+ }
  
  
  /*QUAKED spawnfunc_func_button (0 .5 .8) ?
@@@ -738,7 -738,7 +738,7 @@@ void spawnfunc_func_button(
      self.flags |= FL_NOTARGET;
  
        button_reset();
- };
+ }
  
  
  float DOOR_START_OPEN = 1;
@@@ -820,7 -820,7 +820,7 @@@ void door_blocked(
                        door_go_down ();
        }
  */
- };
+ }
  
  
  void door_hit_top()
                self.think = door_rotating_go_down;
        }
        self.nextthink = self.ltime + self.wait;
- };
+ }
  
  void door_hit_bottom()
  {
        if (self.noise1 != "")
                sound (self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTN_NORM);
        self.state = STATE_BOTTOM;
- };
+ }
  
  void door_go_down()
  {
  
        self.state = STATE_DOWN;
        SUB_CalcMove (self.pos1, self.speed, door_hit_bottom);
- };
+ }
  
  void door_go_up()
  {
        self.message = "";
        SUB_UseTargets();
        self.message = oldmessage;
- };
+ }
  
  
 +
  /*
  =============================================================================
  
@@@ -894,62 -893,10 +894,62 @@@ ACTIVATION FUNCTION
  =============================================================================
  */
  
 +float door_check_keys(void) {
 +      local entity door;
 +      
 +      
 +      if (self.owner)
 +              door = self.owner;
 +      else
 +              door = self;
 +      
 +      if (door.spawnflags & (SPAWNFLAGS_GOLD_KEY | SPAWNFLAGS_SILVER_KEY)) {
 +              // this door require a key
 +              // only a player can have a key
 +              if (other.classname != "player")
 +                      return FALSE;
 +              
 +              // check gold key
 +              if (self.owner.spawnflags & SPAWNFLAGS_GOLD_KEY) {
 +                      if (!(other.itemkeys & KEYS_GOLD_KEY)) {
 +                              if (other.key_door_messagetime <= time) {
 +                                      play2(other, "misc/talk.wav");
 +                                      centerprint(other, "You don't have the gold key!");
 +                                      other.key_door_messagetime = time + 2;
 +                              }
 +                              return FALSE;
 +                      } else {
 +                              self.owner.spawnflags &~= SPAWNFLAGS_GOLD_KEY;
 +                      }
 +              }
 +                      
 +              // check silver key
 +              if (self.owner.spawnflags & SPAWNFLAGS_SILVER_KEY) {
 +                      if (!(other.itemkeys & KEYS_SILVER_KEY)) {
 +                              if (other.key_door_messagetime <= time) {
 +                                      play2(other, "misc/talk.wav");
 +                                      centerprint(other, "You don't have the silver key!");
 +                                      other.key_door_messagetime = time + 2;
 +                              }
 +                              return FALSE;
 +                      } else {
 +                              self.owner.spawnflags &~= SPAWNFLAGS_SILVER_KEY;
 +                      }
 +              }
 +              
 +              // door is now unlocked
 +              play2(other, "misc/talk.wav");
 +              centerprint(other, "Door unlocked!");
 +      }
 +      
 +      return TRUE;
 +}
 +
 +
  void door_fire()
  {
-       local entity    oself;
-       local entity    starte;
+       entity  oself;
+       entity  starte;
  
        if (self.owner != self)
                objerror ("door_fire: self.owner != self");
                self = self.enemy;
        } while ( (self != starte) && (self != world) );
        self = oself;
- };
+ }
  
  
  void door_use()
  {
-       local entity oself;
+       entity oself;
  
        //dprint("door_use (model: ");dprint(self.model);dprint(")\n");
 +      
        if (self.owner)
        {
                oself = self;
                door_fire ();
                self = oself;
        }
- };
+ }
  
  
  void door_trigger_touch()
  {
        if (other.health < 1)
 -      if not(other.iscreature && other.deadflag == DEAD_NO)
 -              return;
 +              if not(other.iscreature && other.deadflag == DEAD_NO)
 +                      return;
  
        if (time < self.attack_finished_single)
                return;
 +      
 +      // check if door is locked
 +      if (!door_check_keys())
 +              return;
 +      
        self.attack_finished_single = time + 1;
  
        activator = other;
  
        self = self.owner;
        door_use ();
- };
+ }
  
  
  void door_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
  {
-       local entity oself;
+       entity oself;
        if(self.spawnflags & DOOR_NOSPLASH)
                if(!(DEATH_ISSPECIAL(deathtype)) && (deathtype & HITTYPE_SPLASH))
                        return;
        self.health = self.health - damage;
 +      
 +      if (self.spawnflags & SPAWNFLAGS_GOLD_KEY || self.spawnflags & SPAWNFLAGS_SILVER_KEY) {
 +              // don't allow opening doors through damage if keys are required
 +              return;
 +      }
 +      
        if (self.health <= 0)
        {
                oself = self;
                door_use ();
                self = oself;
        }
- };
+ }
  
  
  /*
@@@ -1091,7 -1026,7 +1091,7 @@@ void door_touch(
                        centerprint (other, self.owner.message);
                play2(other, "misc/talk.wav");
        }
- };
+ }
  
  
  void door_generic_plat_blocked()
                        door_rotating_go_down ();
        }
  */
- };
+ }
  
  
  void door_rotating_hit_top()
                return;         // don't come down automatically
        self.think = door_rotating_go_down;
        self.nextthink = self.ltime + self.wait;
- };
+ }
  
  void door_rotating_hit_bottom()
  {
                self.lip = 0;
        }
        self.state = STATE_BOTTOM;
- };
+ }
  
  void door_rotating_go_down()
  {
  
        self.state = STATE_DOWN;
        SUB_CalcAngleMove (self.pos1, self.speed, door_rotating_hit_bottom);
- };
+ }
  
  void door_rotating_go_up()
  {
        self.message = "";
        SUB_UseTargets();
        self.message = oldmessage;
- };
+ }
  
  
  
@@@ -1207,8 -1142,8 +1207,8 @@@ SPAWNING FUNCTION
  
  entity spawn_field(vector fmins, vector fmaxs)
  {
-       local entity    trigger;
-       local   vector  t1, t2;
+       entity  trigger;
+       vector  t1, t2;
  
        trigger = spawn();
        trigger.classname = "doortriggerfield";
        t2 = fmaxs;
        setsize (trigger, t1 - '60 60 8', t2 + '60 60 8');
        return (trigger);
- };
+ }
  
  
  float EntitiesTouching(entity e1, entity e2)
        if (e1.absmax_z < e2.absmin_z)
                return FALSE;
        return TRUE;
- };
+ }
  
  
  /*
@@@ -1251,8 -1186,8 +1251,8 @@@ LinkDoor
  */
  void LinkDoors()
  {
-       local entity    t, starte;
-       local vector    cmins, cmaxs;
+       entity  t, starte;
+       vector  cmins, cmaxs;
  
        if (self.enemy)
                return;         // already linked by another door
                }
        } while (1 );
  
- };
+ }
  
  
 -/*QUAKED spawnfunc_func_door (0 .5 .8) ? START_OPEN x DOOR_DONT_LINK x x TOGGLE
 +/*QUAKED spawnfunc_func_door (0 .5 .8) ? START_OPEN x DOOR_DONT_LINK GOLD_KEY SILVER_KEY TOGGLE
  if two doors touch, they are assumed to be connected and operate as a unit.
  
  TOGGLE causes the door to wait in both the start and end states for a trigger event.
  
  START_OPEN causes the door to move to its destination when spawned, and operate in reverse.  It is used to temporarily or permanently close off an area when triggered (not useful for touch or takedamage doors).
  
 +GOLD_KEY causes the door to open only if the activator holds a gold key.
 +
 +SILVER_KEY causes the door to open only if the activator holds a silver key.
 +
  "message"     is printed when the door is touched if it is a trigger door and it hasn't been fired yet
  "angle"               determines the opening direction
  "targetname" if set, no touch field will be spawned and a remote button or trigger field activates the door.
@@@ -1382,10 -1313,6 +1382,10 @@@ void door_reset(
  
  void spawnfunc_func_door()
  {
 +      //dprint("spawnfunc_func_door() spawnflags=", ftos(self.spawnflags));
 +      //dprint(", gold_key=", ftos(self.spawnflags & SPAWNFLAGS_GOLD_KEY));
 +      //dprint(", silver_key=", ftos(self.spawnflags & SPAWNFLAGS_SILVER_KEY), "\n");
 +
        //if (!self.deathtype) // map makers can override this
        //      self.deathtype = " got in the way";
        SetMovedir ();
        self.blocked = door_blocked;
        self.use = door_use;
  
 -    if(self.spawnflags & 8)
 -        self.dmg = 10000;
 +      // FIXME: undocumented flag 8, originally (Q1) GOLD_KEY
 +      // if(self.spawnflags & 8)
 +      //      self.dmg = 10000;
  
      if(self.dmg && (!self.message))
                self.message = "was squished";
        InitializeEntity(self, LinkDoors, INITPRIO_LINKDOORS);
  
        self.reset = door_reset;
- };
+ }
  
  /*QUAKED spawnfunc_func_door_rotating (0 .5 .8) ? START_OPEN BIDIR DOOR_DONT_LINK BIDIR_IN_DOWN x TOGGLE X_AXIS Y_AXIS
  if two doors touch, they are assumed to be connected and operate as a unit.
@@@ -1573,7 -1499,7 +1573,7 @@@ void spawnfunc_func_door_rotating(
        InitializeEntity(self, LinkDoors, INITPRIO_LINKDOORS);
  
        self.reset = door_rotating_reset;
- };
+ }
  
  /*
  =============================================================================
@@@ -1600,7 -1526,7 +1600,7 @@@ float SECRET_YES_SHOOT = 16;    // shootab
  
  void fd_secret_use()
  {
-       local float temp;
+       float temp;
        string message_save;
  
        self.health = 10000;
        SUB_CalcMove(self.dest1, self.speed, fd_secret_move1);
        if (self.noise2 != "")
                sound(self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTN_NORM);
- };
+ }
  
  // Wait after first movement...
  void fd_secret_move1()
        self.think = fd_secret_move2;
        if (self.noise3 != "")
                sound(self, CH_TRIGGER_SINGLE, self.noise3, VOL_BASE, ATTN_NORM);
- };
+ }
  
  // Start moving sideways w/sound...
  void fd_secret_move2()
        if (self.noise2 != "")
                sound(self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTN_NORM);
        SUB_CalcMove(self.dest2, self.speed, fd_secret_move3);
- };
+ }
  
  // Wait here until time to go back...
  void fd_secret_move3()
                self.nextthink = self.ltime + self.wait;
                self.think = fd_secret_move4;
        }
- };
+ }
  
  // Move backward...
  void fd_secret_move4()
        if (self.noise2 != "")
                sound(self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTN_NORM);
        SUB_CalcMove(self.dest1, self.speed, fd_secret_move5);
- };
+ }
  
  // Wait 1 second...
  void fd_secret_move5()
        self.think = fd_secret_move6;
        if (self.noise3 != "")
                sound(self, CH_TRIGGER_SINGLE, self.noise3, VOL_BASE, ATTN_NORM);
- };
+ }
  
  void fd_secret_move6()
  {
        if (self.noise2 != "")
                sound(self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTN_NORM);
        SUB_CalcMove(self.oldorigin, self.speed, fd_secret_done);
- };
+ }
  
  void fd_secret_done()
  {
        }
        if (self.noise3 != "")
                sound(self, CH_TRIGGER_SINGLE, self.noise3, VOL_BASE, ATTN_NORM);
- };
+ }
  
  void secret_blocked()
  {
                return;
        self.attack_finished_single = time + 0.5;
        //T_Damage (other, self, self, self.dmg, self.dmg, self.deathtype, DT_IMPACT, (self.absmin + self.absmax) * 0.5, '0 0 0', Obituary_Generic);
- };
+ }
  
  /*
  ==============
@@@ -1743,7 -1669,7 +1743,7 @@@ void secret_touch(
                        centerprint (other, self.message);
                play2(other, "misc/talk.wav");
        }
- };
+ }
  
  void secret_reset()
  {
@@@ -1811,7 -1737,7 +1811,7 @@@ void spawnfunc_func_door_secret(
  
        self.reset = secret_reset;
        secret_reset();
- };
+ }
  
  /*QUAKED spawnfunc_func_fourier (0 .5 .8) ?
  Brush model that moves in a pattern of added up sine waves, can be used e.g. for circular motions.
@@@ -1826,7 -1752,7 +1826,7 @@@ dmgtime: See above
  
  void func_fourier_controller_think()
  {
-       local vector v;
+       vector v;
        float n, i, t;
  
        self.nextthink = time + 0.1;
        if(self.owner.classname == "func_fourier") // don't brake stuff if the func_fourier was killtarget'ed
                // * 10 so it will arrive in 0.1 sec
                self.owner.velocity = (v - self.owner.origin) * 10;
- };
+ }
  
  void spawnfunc_func_fourier()
  {
-       local entity controller;
+       entity controller;
        if (self.noise != "")
        {
                precache_sound(self.noise);
        self.effects |= EF_LOWPRECISION;
  
        // TODO make a reset function for this one
- };
+ }
  
  // reusing some fields havocbots declared
  .entity wp00, wp01, wp02, wp03;
@@@ -1992,7 -1918,7 +1992,7 @@@ void func_vectormamamam_findtarget(
  
        self.destvec = self.origin - func_vectormamamam_origin(self.owner, 0);
  
-       local entity controller;
+       entity controller;
        controller = spawn();
        controller.classname = "func_vectormamamam_controller";
        controller.owner = self;