Floating items
Floating items
Is it possible to add in a item at any point in the map and have it float at a pre-defined position in the air?
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
Re: Floating items
Code: Select all
ent->spawnflags |= 1;
G_SetOrigin(ent, ent->s.origin);
Re: Floating items
I see this code inside g_items.c
I don't understand though how I can add an item that isn't already in the map with this code.
Code: Select all
if ( ent->spawnflags & 1 ) {
G_SetOrigin( ent, ent->s.origin );
}
I don't understand though how I can add an item that isn't already in the map with this code.
-
- Posts: 304
- Joined: Fri Aug 08, 2003 7:00 am
Re: Floating items
Look at how the items are spawned in g_item.c
-It is not the fall that kills you. It's the sudden stop at the end. (Douglas Adams)-
[url=http://www.violationentertainment.com/misc/ccm]-An eyeful a day is bloody fantastic!-[/url]
[url=http://www.violationentertainment.com/misc/ccm]-An eyeful a day is bloody fantastic!-[/url]
Re: Floating items
Ok, I'll have to research into what is going on in those functions.