Forum

Hmm, setsize?

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Hmm, setsize?

Postby r00k » Thu Sep 16, 2010 4:44 pm

I forgot why projectiles are setsize'd to '000','000' ?
Code: Select all
   setmodel  (missile, "progs/missile.mdl");
   setsize   (missile, '0 0 0', '0 0 0');
   setorigin (missile, self.origin + v_forward*8 + '0 0 16');


I thought it was because the engine would provide the dimensions but, in practice setsize it called after setmodel...

Code: Select all
   if (mod)
   {
      if (mod->type != mod_alias)
         PF_SetMinMaxSize (e, mod->mins, mod->maxs);
      else
         PF_SetMinMaxSize (e, quakemins, quakemaxs);
   }
   else
      PF_SetMinMaxSize (e, vec3_origin, vec3_origin);


EDIT:
Okay so then i see in world.c SV_MOVE is where the collision happens, and with MOVETYPE_FLYMISSILE sets the bounding box to
Code: Select all
if (type == MOVE_MISSILE)
   {
      for (i=0 ; i<3 ; i++)
      {
         clip.mins2[i] = -15;
         clip.maxs2[i] = 15;
      }
   }


but what about grenades?

Oh and on a side note, the ogre was supposed to have a nailgun??
Code: Select all
/*
===============
launch_spike

Used for both the player and the ogre
===============
*/



:D
Last edited by r00k on Thu Sep 16, 2010 5:10 pm, edited 1 time in total.
r00k
 
Posts: 1110
Joined: Sat Nov 13, 2004 10:39 pm

Postby qbism » Thu Sep 16, 2010 5:00 pm

Otherwise they'd hit walls or monsters that should have been missed, and would make it frustrating to try to fire over ledges or around corners. I tried setting a missile to 8x8x8 once and that's what happened.
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Postby Spike » Thu Sep 16, 2010 5:18 pm

pretty much anything other than '0 0 0' '0 0 0' will cause it to use hull 1. and that's huge. there's no way to separate bsp collisions/hulls and ent collisions, other than MOVE_MISSILE hacks.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby r00k » Fri Sep 17, 2010 4:02 am

ok, i figured it was some kinda hackery, which almost seemed like it was tracing backwards, after the fact. I was just wonder if it was 100% accurate cause i was playing last night and i swore i thought i saw a missile pass through someone while they were turning around...
r00k
 
Posts: 1110
Joined: Sat Nov 13, 2004 10:39 pm


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest