SHARE
TWEET

Untitled

a guest Sep 18th, 2019 114 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*QUAKED func_barrier (0 .5 .8) ?
  2. barrier is similar to noclip brushes, is non-solid until triggered,
  3. used to stop Vigil from going places he's not supposed to. Careful
  4. as to not allow other players to get stuck inside it!
  5.  
  6. requires a target name
  7.  
  8. */
  9. void() barrier_use =
  10. {
  11.     if (self.mode == 1)
  12.     {
  13.         self.solid = SOLID_NOT;
  14.         self.mode = 0;
  15.         return;
  16.     }
  17.     else
  18.     {
  19.         self.solid = SOLID_BBOX;
  20.         self.movetype = MOVETYPE_PUSH;
  21.         setorigin(self, self.origin);
  22.         self.mode = 1;
  23.         return;
  24.     }
  25.  
  26. };
  27.  
  28. void() func_barrier =
  29. {
  30.     if (!self.targetname)
  31.         objerror ("func_barrier with no target name found\n");
  32.  
  33.     self.solid = SOLID_NOT;
  34.     self.movetype = MOVETYPE_PUSH;
  35.     self.classname = "barrier";
  36.     setmodel (self, self.model);
  37.     setsize (self, self.mins , self.maxs);
  38.     setorigin(self, self.origin);
  39.     self.use = barrier_use;
  40. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top