func_radar brush.

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators

func_radar brush.

Postby Mizu Kitsune » Wed Jun 17, 2009 4:41 am

As I said earlier this is buggy atm, so any help or testing is appreciated, and i would like to see some SP, CTF, ASSAULT, DOM, and ONSLAUGHT maps make use of this.

ok, put this at the bottom of miscfunctions.qc or in func_radar.qc [note: func_radar.qc must come imediately after miscfunctions.qc in progs.src]

Code: Select all
void () radar_think ={ local entity head; head = nextent (world); while (head != world) {  if (head.health > 0)  {   if (head.classname == "player")   {    local vector bliporg;    bliporg = '0 0 0';    bliporg_x = (head.origin_x / self.punchangle_x) + self.origin_x;    bliporg_y = (head.origin_y / self.punchangle_y) + self.origin_y;    bliporg_z = (head.origin_z / self.punchangle_z) + self.origin_z;    local entity blip;    blip = spawn ();    setorigin (blip, bliporg);    setmodel (blip, "progs/laserdot.spr");    blip.think = SUB_Remove;    blip.nextthink = time + self.cnt;   }  }  head = nextent (head); } self.think = radar_think; self.nextthink = time + self.cnt;};
void () func_radar ={ if (!self.model)  setsize (self, '-100 -100 -100', '100 100 100'); else {  setmodel (self, self.model);  local vector org;  org = '0 0 0';  org_x = (self.maxs_x + self.mins_x) / 2;  org_y = (self.maxs_y + self.mins_y) / 2;  org_z = (self.maxs_z + self.mins_z) / 2;  setorigin (self, org); } if (!self.cnt)  self.cnt = 1; self.punchangle = '0 0 0'; self.punchangle_x = 8192 / self.size_x; self.punchangle_y = 8192 / self.size_y; self.punchangle_z = 8192 / self.size_z; self.solid = SOLID_NOT; self.movetype = MOVETYPE_NONE; self.think = radar_think; self.nextthink = time + self.cnt;};


now save miscfunctions.qc is and open up cl_client.qc. Go to PutClientInServer, and just before that function add:
Code: Select all
void () func_radar;

then at the end of PutClientInServer paste
Code: Select all
if (!find (world, classname, "func_radar"))
{
  local entity radar;

  radar = spawn ();
  radar.classname = "func_radar";
  setorigin (radar, self.origin);
  radar.think = func_radar;
  radar.nextthink = time;
}

save and compile, then add func_radar to entities.def in your radiant folder. to make it 2d, remove z code for topview radar and y code for sideview.
+The Dude+
[-Project 2501-]
Mizu Kitsune
Alien trapper
 
Posts: 362
Joined: Sat Apr 11, 2009 7:51 pm
Location: Maridia

Postby Alien » Wed Jun 17, 2009 4:43 am

Just use svn diff.
Alien
Forum addon
 
Posts: 1212
Joined: Tue Apr 22, 2008 7:12 am

Postby Mizu Kitsune » Wed Jun 17, 2009 4:45 am

i will once i get my adapter fixed and can get off my pda. i can post a precompiled progs.dat.
+The Dude+
[-Project 2501-]
Mizu Kitsune
Alien trapper
 
Posts: 362
Joined: Sat Apr 11, 2009 7:51 pm
Location: Maridia


Return to Nexuiz - Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron