Jump to content

[10052][patch] Camera system


Auntie Mangos

Recommended Posts

Patch has written to improve work of farsight effects. Current farsight implementation is not full.

There are some problems with current implementation:

you can't see the world around controlled unit (when that unit too far from you), you can't receive broadcast packets and object field changes

What is done:

  • * added new Camera and Viewpoint classes. Camera - specialized grid object with player-owner, can update visibility of world around viewpoint, capture broadcast packets and send them to owner. Camera can be attached to dynamic object, unit or player.
    Even in normal state player has a camera, that attached to owner. Viewpoint - container for cameras attached to it.
    * added more simple interface for grid visits
    * each grid visitor gained a visitor-type, for example: GenericVisitorType can visit all objects in grid, excluding Cameras, CamerasVisitorType allowed to visit all existing grid objects
    * used camera system functions in some spell\\aura handlers
    * changed visibility, packet broadcast notifiers (these notifiers must visit camera grid containers, not player containers)

Current active branch is: http://github.com/SilverIce/mangos/commits/cameras_changed

Need testing for stability on live servers

[added]

due to last changes patch for sd2 library not needed

I have modified eye of acherus patch to demonstrate work of camera system.

Patch can work correctly only with camera system patch. Visibility updates and broadcast packet capturing now handled by camera - so, you can see more world around the eye, you can receive packets from objects around eye (i.e. you can see movements of nearby creatures, you can see how the eye casts spells, etc). This patch is still a hack(at least spell part), but it was not my purpose.

eye of acherus modified patch

Link to comment
Share on other sites

  • Replies 92
  • Created
  • Last Reply

Top Posters In This Topic

I have modified eye of acherus patch to demonstrate work of camera system

Patch can work correctly only with camera system patch. Visibility updates and broadcast packet capturing now handled by camera - so, you can see more world around the eye, you can receive packets from objects around eye (i.e. you can see movements of nearby creatures, you can see how the eye casts spells, etc). This patch is still a hack(at least spell part), but it was not my purpose.

http://filebeam.com/c7fc95ab50658643907ec327619b493d

Link to comment
Share on other sites

oops! u're right! i was doing that on a fresh new install. ahaha

sorry!

-=-=-=-=-=-=-=-=-

I still couldn't make this work. I mean, I patched my mangos and S2dev successfully but Eye of Acherus still doesn't works.

I'm using files from http://getmangos.eu/community/showthread.php?9668-Eye-of-Acherus&p=109456&viewfull=1#post109456 as well to insert some lines into database and so but, when I try to apply that after this patch for camera fix, I have some merge errors that I couldn't solve manualy.

Without that patch, from that topic about Eye of Acherus, ingame, when I click on the Eye, my character appears to start summon something but then it stops and nothing happens.

Could someone post here a guide or something to help me/us to have Eye of Acherus working? It can be really resumed... just with the steps and the right diffs (and order to apply them) and db insertions we have to make.

I'll be really thankful

Link to comment
Share on other sites

  • 40 years later...
Very nice. Just wondering: does this has anything to do with grids not being loaded going through a cinematic?

No, currently it does nothing with cinematic intro. Need know waypoints of that camera, also need know which object used as viewpoint.

As far as i know there is no such object (or at least it not visible for client)

Link to comment
Share on other sites

yes, capture packets from objects around viewpoint is one of the camera's functions

No, currently it does nothing with cinematic intro. Need know waypoints of that camera, also need know which object used as viewpoint.

As far as i know there is no such object (or at least it not visible for client)

One of possible ways: summon invisible unit, attach camera to it, send cinamatic start packet, and then began move unit by some waypoints, but it looks like a hack

Link to comment
Share on other sites

Dunno if its related or not, but I had some with old far sight system - When I summon unit in SD2 script an then add Far Sight by player->SetFarSightGUID(unit->GetGUID()); but when other players in party leave instance/map, crash appear in SendUpdateToOutOfRangeGroupMembers(): http://pastebin.com/ZkzQK1Ds

Maybe you can do something about it or its alredy fixed in your patch, anyway good to know about it.

Link to comment
Share on other sites

not related, or related to old system..

this may be will help you to avoid thre crash:

in function void Group::UpdatePlayerOutOfRange(Player* pPlayer) change

- if (player && player != pPlayer && !pPlayer->isVisibleFor(player,player->GetViewPoint()))

+ if (player && player != pPlayer && !player->HaveAtClient(pPlayer))

PS i have not touched old farsight functions, Player::SetFarSightGUID not related to camera system,

use player->GetCamera.SetView instead

Added: patch reuploaded, replaced old farsight functions with new

PS testing still needed

Link to comment
Share on other sites

Okey, "Guide - Hot to test my patch and saw the difference betweeen clean core and camera system":

cast 530 spell on player, and then move him from player-controller as far as you can

do the same thing on clean core

and, yes, my patch does almoust nothing will spell system, i'm not spell system guy

Mind control and Eye of Kilrogg are still just as bad as before (get interrupted as soon as you move) Maybe this is because the spells need more work. Didn't test with Eyes of the Beast.
Camera - specialized grid object with player-owner, can update visibility of world around viewpoint, capture broadcast packets and send them to owner. Camera can be attached to dynamic object, unit or player.

i said that i have fixed aura interrupts? where?

Link to comment
Share on other sites

Okey, "Guide - Hot to test my patch and saw the difference betweeen clean core and camera system":

cast 530 spell on player, and then move him from player-controller as far as you can

do the same thing on clean core

and, yes, my patch does almoust nothing will spell system, i'm not spell system guy

i said that i have fixed aura interrupts? where?

I just assumed it had something to do with it. Apparently it did not.

I will test what you said.

It's a nice step in the right direction.

Link to comment
Share on other sites

I was also wrong about the spells: mind control does work properly for some NPCs but not others; however, this is off-topic.

No, this is not offtopic i have found that problem too. This is some kind of problem related to packet sequence. Strange, but there is no problems for players. Can't solve it yet.

And thanks for testing :)

Added: problem resolved with my last commit

Link to comment
Share on other sites

No, this is not offtopic i have found that problem too. This is some kind of problem related to packet sequence. Strange, but there is no problems for players. Can't solve it yet.

And thanks for testing :)

Added: problem resolved with my last commit

Thanks, will be testing this.

Edit: tested and works perfectly.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use