All pastes #572583 Raw Edit

Someone

public text v1 · immutable
·published 2007-06-17 19:08 UTC
rendered paste body
I prepare patch ( http://pastebin.ca/571716 ) that solve some problems with current grid notifiers and visibility system.

Patch fix:
1) problem with not show player's not released bodies of wiped raid to resurrected player. This not let resurrect anoyther players.
2) problem with show creatures for player in ghost mode, if creature start move from zone around player corpse but move out of expected range for showing
3) problem with not show players around corpse for player in ghost mode
4) other combinations when player dead but not release body or resurrected...
5) visibility information used at sever and show objects at client always synchronized
6) invisibility system rewrited in state that allow easy implement creature invisibility
7) in general more clear for understanding code for data updates sending to clients and visibility system work

Patch expected to improve resources use:
1) send world object updates to client only for really visible objects at client
2) simlify, remove duplicate calls and merge many grid notifiers similar by code and work, that also must save some data in network use
3) less network data and less amount update generation, less npc state request from clients must save CPU time
4) players/creatures/and non active object visibility max distance setting in mangosd.conf can let tune server CPU/netword load by setting, for example object distance to low value/etc.

Patch required addition resources:
1) each player store in std::set guids for currently visible objects for this player's client (30-60 guids, size tested by running by ironforge and storwind)
2) IsVisiableFor checks instead old !isAlive + etc code can run more slow (more CPU time use) See also (3) in prev. lst.

Work of patch tested with small amount player but for wide range situation including near/far teleports/running/ rogue and gm invisibility use and detection/ zone around zone effect work for creatures and players, player bodies/corpse/player show at resurrection/ect.

Please, test and comment.