[rvSinceForever?]Allied monsters do not attack enemy players

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [rvSinceForever?]Allied monsters do not attack enemy players

Re: [rvSinceForever?]Allied monsters do not attack enemy players

by Rachael » Sun May 03, 2009 9:08 pm

Not a problem.

Re: [rvSinceForever?]Allied monsters do not attack enemy players

by Captain Ventris » Sun May 03, 2009 8:32 pm

Oh, didn't notice this. Thanks a bunch, Priestess!

Re: [rvSinceForever?]Allied monsters do not attack enemy players

by Rachael » Fri May 01, 2009 2:05 am

Okay, since I got no response yet, I am just going to upload my fix. If you guys don't like it, I can always either change it, or you can change it, whichever way you like it.

Notable files changed are p_enemy.cpp and p_enemy_a_lookex.cpp. I don't know if either code does not get used so I updated both just to be sure.
Attachments
Completes.zip
Complete files - just drop these in and they'll work.
(23.73 KiB) Downloaded 26 times
diffs.zip
diff files - made with SVN diff against GZDoom r323 (should still be the same on the present version of ZDoom)
(1.67 KiB) Downloaded 23 times

Re: [rvSinceForever?]Allied monsters do not attack enemy players

by Rachael » Fri May 01, 2009 1:18 am

Okay.

As a friendly monster, do we prefer monsters as targets, in deathmatch, or do we prefer players? Those are the two easiest ways to code this thing, unless I can also code it so that it considers the player object itself among the monsters but that will be subject to distance checks, blockmap search, etc.

The fix I have in now prefers monsters - it searches for monsters first, and if it doesn't find any it does a fall-through to the normal player routine that unfriendly monsters use, but there is an additional check to make sure the monster is not attacking his master, or if he doesn't have one, any players at all.

Re: [rvSinceForever?]Allied monsters do not attack enemy players

by Graf Zahl » Fri May 01, 2009 12:54 am

I don't think such a change needs a compatibility option.

Re: [rvSinceForever?]Allied monsters do not attack enemy players

by Rachael » Thu Apr 30, 2009 10:04 pm

Graf, if I modify the enemy AI code, so that friendly monsters attack any player they consider to be an enemy, is it safe to just modify the code directly or am I going to need to make flags/compatibility options/A_Look flags/whatever to prevent mods from breaking?

In its current form, in deathmatch, friendly monsters will attack enemy players if the player hits them first, and also, they will attack enemy players' friendly monsters, but they will not attack the players unprovoked.

Also, they give no consideration to team deathmatch, I don't know if that's implemented in ZDoom though.

Re: [rvSinceForever?]Allied monsters do not attack enemy players

by Macil » Mon Apr 27, 2009 5:03 pm

Captain Ventris wrote:So, no interest? Could there be something server-related that might cause such monster-apathy?
Well ZDoom doesn't use servers like Skulltag, so probably not.

I think the friendly targeting code has some problems. I've seen many friendlies walk right by enemies and merely wander with seemingly no target.

Re: [rvSinceForever?]Allied monsters do not attack enemy players

by Captain Ventris » Mon Apr 27, 2009 12:25 am

The thing is, I never noticed it until testing ZDoom Wars on Skulltag, the first time I had seen such an interaction online. I have no idea when it started. I made a bug report for this on the Skulltag forums, thinking it might be an ST thing, but Torr said he thought "ST and ZDoom are similar in that respect", so I came here.

If this isn't true for the latest version of ZDoom, I would be mighty curious to find out why there was a change in Monster Target selection.

EDIT: Furthermore, the player classes involved have weapons that constantly A_AlertMonsters, making this even stranger.

Re: [rvSinceForever?]Allied monsters do not attack enemy players

by Rachael » Sun Apr 26, 2009 8:06 pm

I don't know how the devs feel about it, but digging through the enemy code hasn't yielded much for me, yet. I haven't had as much time as I'd like, though.

I'm sure it's just a simple fix somewhere, but figuring out what it is would take a bit of analyzing the code and seeing what went wrong. It would help a lot knowing when the code broke in the first place, so that I can see what changes were made that caused this behavior.

I'm very much interested in getting this bug fixed, though.

Re: [rvSinceForever?]Allied monsters do not attack enemy players

by Captain Ventris » Sun Apr 26, 2009 2:51 pm

So, no interest? Could there be something server-related that might cause such monster-apathy?

Re: [rvSinceForever?]Allied monsters do not attack enemy players

by Captain Ventris » Sat Apr 18, 2009 8:59 pm

Osiris wrote:I wasn't always like that. Back in the 2.1.5 days, they certainly did.
I wasn't sure how far it went back, heh. It hasn't concerned me until recently. I reported this on Skulltag, and Torr told me ST and ZDoom weren't much different in this respect, and I was told by others to just report it here.

Re: [rvSinceForever?]Allied monsters do not attack enemy players

by Osiris Kalev » Sat Apr 18, 2009 8:16 pm

It wasn't always like that. Back in the 2.1.5 days, they certainly did.

[rvSinceForever?]Allied monsters do not attack enemy players

by Captain Ventris » Sat Apr 18, 2009 8:03 pm

I'm not sure if this is REALLY a bug, per se, but a Player's allied monsters rarely, if ever, target enemy players online, even if that player is the only available target. They will just walk right on past, not attack in melee, nothing, they will just continue to follow their owner as if no targets are present. Strangely, the occasional monster WILL target the enemy player, but that is a rare case. This just seems weird, and it makes me sad.

Top