fixed aggro and z-radius bug from 5/5 CVS compile
from module zone/mobai.cpp
starts at line 201 Code:
Mob* EntityList::AICheckCloseArrgo(Mob* sender, float iArrgoRange, float iAssistRange) { I also reduced all aggroradius on mobs to 65 from 85. I feel this is a good compromise given that you cant do LOS checks and chain aggro gets silly otherwise.... |
So uhm basicly what you did was removed everything you didn't understand, slowed down the proccessing and removed a whole bunch of checks that really need to be there. (invisable, for instance). And after all that still use my screwed up zaxis formula!
There needs tobe a zone flag (indoor/outdoor) it's not there yet. There needs tobe a zAgro added to npc_types. You check the zone flag when you spawn a mob from the db, if the mob has a no zAgro set (-1 for default, 0 none ect) it gets a default formula. In an outdoor zone z agro is basicly agro radius extended around to make a sphere, you can set the zAgro of an npc so it will not extend thru floors. For example if you wanted to remove the chain agro from a Guard in the top of a tower when the lower one was pulled, Or makeing the bandits on the highpass ramp agro from far ahead on the path, and not agro people walking up the gorge (they aren't paratroopers afterall). You need this for zones like blackburrow, city of mist and cazicthule. If its an indoor zone it will get another default, something like 5-10 should keep most mobs from comeing thru floors and ceilings. In these zones you may want to tweak the zAgro up for mobs guarding stairs and ramps. Then you can do fun stuff like only agro an pc standing outside tormax with that uber rare spawn dog that agros from below >=) anyways.. Code:
distZ = sender->DistZ(mob); Code:
float Mob::DistZ(Mob* other){ Code:
distZ = sender->Dist(mob) - sender->DistNoZ(mob); |
sorry if i offended anyone... i was frustrated with not having working aggro so i decided to try my best..
My abilities are severely limited yes, this is a learning project for me.. the zaxis formula i pretty much came up with myself, if i ended up copying yours.. its not rocket science... There is an invis check there and i tested it in sebilis, it seems to work.... the code is prolly slow as molasses yes, i dont have a clue there... I understand how and why aggro works pretty well. I couldnt understand your code well at all no. So i went back and pulled old code that was easier to read and re wrote sections of it to fix the problem i was having. /shrug this was meant to be more of a temporary fix until people have time to do it right, better whatever.... |
All times are GMT -4. The time now is 01:46 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.