Dusty Posted July 15, 2016 Posted July 15, 2016 Are there any inbuilt classes in the Quake3/Jedi Knight internal libraries for vectors/lists?
Solution Raz0r Posted July 16, 2016 Solution Posted July 16, 2016 Nope. Use std::vector, linked lists or realloc.
Futuza Posted July 20, 2016 Posted July 20, 2016 Or if you're crazy, build your own On a serious note, there's pretty much no reason not to make use std::vector
eezstreet Posted July 20, 2016 Posted July 20, 2016 Or if you're crazy, build your own On a serious note, there's pretty much no reason not to make use std::vectorExcept when the situation isn't ideal for it. OP, what are you using the vector for?
Dusty Posted July 26, 2016 Author Posted July 26, 2016 I built my own linked list data structure. Better than that though, I think I'll just use arrays with special values to indicate empty slots. What I was using it for is to have NPCs maintain several lists of weapons they have for multi-weapon support like all weapons possessed, heavy weapons, blaster weapons, etc. That way when they have their weapon taken or they cycle between multiple weapons (like Boba) they can make a proper decision of what to switch to without the AI expecting them to possess certain weapons. Asgarath83 likes this
Raz0r Posted July 26, 2016 Posted July 26, 2016 The way that's generally handled (with <= 32 weapons) is just a single uint32_t weapons, if the nth bit is set, it owns the nth weapon.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now