Quasar Posted April 6, 2007 Work continues slowly on the next version of EE, which will probably be shooting for a summer release (maybe earlier if linked portals are finished soon). I have just completed a conversion of all the player's weapon codepointers to use of the same prototype as codepointers for normal moving objects. This means, TADA, that there are no more problems with crashes via DeHackEd if you assign a weapon pointer to a monster, or a monster pointer to a weapon, or vice versa. In fact, amongst other things this enables, monsters can now successfully use the Saw codepointer, allowing the possibility of chainsaw zombies ;) Please don't ask why it took me so long to think of such a simple and elegant solution to that nasty problem. It was staring me in the face for all these years. Note however that this doesn't totally obsolete the old PlayerThunk pointer, which previously allowed use of a set of most of the pointers on weapons, because this pointer makes it possible to assign ammo usage and alter other properties of attacks in a way that makes them more useful. 0 Quote Share this post Link to post
DaniJ Posted April 6, 2007 Nice work. Can I ask what solution you came up with? I've been working towards doing a similar thing in jDoom for 1.9.1 but atm I'm still working on routing out all the non-standard use of the mobj_t members (special, target etc). 0 Quote Share this post Link to post
Quasar Posted April 7, 2007 Well currently most of the player weapon pointers aren't really usable by monsters. The pointers take mobj_t *mo as a parameter, and check if(mo->player) before doing anything. The psprite pointer can be gotten from player_t -- I added a member to that struct called curpsprite which is set from P_SetPsprite before it calls the action function. It holds the index into the player's psprites array that the codepointer needs to manipulate (and not even nearly all the pointers need to manipulate the psprite -- the vast majority do not). So it looks like this example in the end:void A_SomeGunPointer(mobj_t *mo) { player_t *player; psprite_t *psp; if(!(player = mo->player)) return; psp = &player->psprites[player->curpsprite]; // ... } A few of the weapon pointers can work for monsters because they don't require any special fields from the player_t struct. The Saw pointer is one such, and I'm working on possible ways to make some of the others work too. 0 Quote Share this post Link to post
DaniJ Posted April 8, 2007 Ah ok. Yeah, it does seem pretty obvious now you spell it out. Thanks. 0 Quote Share this post Link to post
Guest Posted April 12, 2007 How are we doing with those updates you mention for my Spear of Destiny job - the slideshows and the enemies don't attack each other when shot? Remember I can provide code for the latter if you need it. 0 Quote Share this post Link to post
Quasar Posted April 12, 2007 That stuff will be in the next release, though I must admit I have not quite gotten to it yet -- I've been addressing bugs in MapInfo, EDF, and trying to help esselfortium find out why the sound code crashes on his x86 Mac (which I have not yet done, btw -- if anyone else has this problem, I need to hear from you pronto). 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.