Bsp model placement

Discuss programming in the QuakeC language.
Post Reply
Error
InsideQC Staff
Posts: 865
Joined: Fri Nov 05, 2004 5:15 am
Location: VA, USA
Contact:

Bsp model placement

Post by Error »

So what I've done is spawned 3 Bsp models in my level. When I place a new entity with the same "model" as the other, it offsets it to where the original model was placed. How do I get around that?

God I hope that made sense... I'm extremely tired.
r00k
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Re: Bsp model placement

Post by r00k »

are you updating the origin?

In my ctf mod, i allow players to toss ammo. But instead of a backpack, it will drop a BSP model of the ammo type

Code: Select all

if (self.weapon == IT_LIGHTNING)
				{
					if (self.ammo_cells > 10)
					{
						self.ammo_cells = self.ammo_cells - 10;
						ammo = 10;
						class = "item_cells";
						m ="maps/b_batt0.bsp";
					}
					else
//...
	item = spawn();
	item.owner = self;
	makevectors(self.v_angle);

	setorigin(item, self.origin + '0 0 16');
	item.velocity = aim(self, 320);
	item.velocity = item.velocity * 320;
	item.flags = FL_ITEM;
	item.solid = SOLID_TRIGGER;
	item.movetype = MOVETYPE_BOUNCE;

	item.aflag = ammo;
	item.classname = class;
	setmodel (item, m);
	
	setsize (item, '0 0 0', '32 32 56');
	item.touch = Team_Ammo_Touch;

	item.nextthink = time + 20;//must remove or else we will run out of server entities!!

	item.think = SUB_Remove;
	W_SetCurrentAmmo();
Error
InsideQC Staff
Posts: 865
Joined: Fri Nov 05, 2004 5:15 am
Location: VA, USA
Contact:

Re: Bsp model placement

Post by Error »

It's not a seperatedly compiled Bsp model. It's an entity that's using the same model as a map defined entity.
Error
InsideQC Staff
Posts: 865
Joined: Fri Nov 05, 2004 5:15 am
Location: VA, USA
Contact:

Re: Bsp model placement

Post by Error »

Nevermind. I solved it by using precompiled Bsp models. The original way was giving me too much pain.

Thanks anyways.
r00k
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Re: Bsp model placement

Post by r00k »

This gives me an idea to make a mini map in quakeC by taking a map and shrinking it down to 10% and spawning it in front of the player ;)
gnounc
Posts: 428
Joined: Mon Apr 06, 2009 6:26 am

Re: Bsp model placement

Post by gnounc »

ala splinter cell?

a few people were discussing taking the map bsp, removing the roof, and flattening it to make a gta esque minimap a while ago.
i believe it was baker and mh.
Error
InsideQC Staff
Posts: 865
Joined: Fri Nov 05, 2004 5:15 am
Location: VA, USA
Contact:

Re: Bsp model placement

Post by Error »

I'm making a hex grid turn based tactics style mod. Been playing a lot of board games recently.
Post Reply