Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Quasar

Recent EE Progress

Recommended Posts

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.

Share this post


Link to post

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).

Share this post


Link to post

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.

Share this post


Link to post

Ah ok. Yeah, it does seem pretty obvious now you spell it out. Thanks.

Share this post


Link to post
Guest

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.

Share this post


Link to post

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).

Share this post


Link to post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×