Jump to content

[10052][patch] Camera system


Auntie Mangos

Recommended Posts

Am I correct in understanding that this new system for the camera can also be used as the basis for doing proper fixes for Eye Of Archerus, Eye of Kilrogg, and other spells that require "remote control" by the character?

Either way, you still did a good job with this one, SilverIce.

Link to comment
Share on other sites

  • Replies 92
  • Created
  • Last Reply

Top Posters In This Topic

Hey, yeah! Now that would be a feat to earn you some major cool points!

Next thing you know, some genius will pop up with a fix to finally allow crews on all those deserted ships! That's what I love about hanging out here, even though I'm no programmer, it's seeing these flashes of genius that unlock new features people thought could never be done... such as SilverIce's work on the camera system and other small fixes that lay the foundation for big changes.

All of you coders just blow my mind every day! May you all continue to be blessed with an abundance of ideas and inspirations. :)

Stillhard, what do you mean by not valid as of revision 9749? Do you mean the patch's code is out of date, causes a server crash due to incompatibilities with the core, or is it merely a failed automatic merge that requires hand editing?

It helps if you can be more specific so others can help to resolve the issue.

Link to comment
Share on other sites

Stillhard, what do you mean by not valid as of revision 9749? Do you mean the patch's code is out of date, causes a server crash due to incompatibilities with the core, or is it merely a failed automatic merge that requires hand editing?

Look at the codes and you'll see...

Example:

[9749]

    MaNGOS::MessageDeliverer post_man(*player, msg, to_self);
-    Cell::VisitWorldObjects(player, post_man, GetVisibilityDistance());
+    TypeContainerVisitor<MaNGOS::MessageDeliverer, WorldTypeMapContainer > message(post_man);
+    cell.Visit(p, message, *this, *player, GetVisibilityDistance());

Will make the patch invalid:

***************
*** 491,497 ****
 void Map::MessageBroadcast(Player *player, WorldPacket *msg, bool to_self)
 {
     MaNGOS::MessageDeliverer post_man(*player, msg, to_self);
-     Cell::VisitWorldObjects(player, post_man, GetVisibilityDistance());
 }

 void Map::MessageBroadcast(WorldObject *obj, WorldPacket *msg)
--- 454,460 ----
 void Map::MessageBroadcast(Player *player, WorldPacket *msg, bool to_self)
 {
     MaNGOS::MessageDeliverer post_man(*player, msg, to_self);
+     Cell::VisitCameras(player, post_man, GetVisibilityDistance());
 }

Link to comment
Share on other sites

It's designed to provide better functionality for the camera system used with spells where the character is remotely seeing, such as Eye Of Acherus, Eye Of Kilrogg, Far Sight, and others. I think this will also affect devices that allow seeing from a distance, such as the Gnomish Telescope.

Link to comment
Share on other sites

When i manual patch my 9691 mangos with the 9728 Patch. i became a make error. :-(

GMTicketMgr.o ../../../src/game/GMTicketMgr.cpp
mv -f .deps/GMTicketMgr.Tpo .deps/GMTicketMgr.Po
g++ -DHAVE_CONFIG_H -I. -I../../../src/game -I../..  -I../../../dep/ACE_wrappers -I../../dep/ACE_wrappers  -I/usr/include/mysql    -I../../src/shared -I../../../src/game -I../../../src/game/../../dep/include -I../../../src/game/../framework -I../../../src/game/../shared -I../../../src/game/../shared/vmap -I../../../src/game/../realmd -DSYSCONFDIR=\\"/var/mangos/etc/\\"   -DDO_MYSQL -g -O2 -MT GossipDef.o -MD -MP -MF .deps/GossipDef.Tpo -c -o GossipDef.o ../../../src/game/GossipDef.cpp
mv -f .deps/GossipDef.Tpo .deps/GossipDef.Po
g++ -DHAVE_CONFIG_H -I. -I../../../src/game -I../..  -I../../../dep/ACE_wrappers -I../../dep/ACE_wrappers  -I/usr/include/mysql    -I../../src/shared -I../../../src/game -I../../../src/game/../../dep/include -I../../../src/game/../framework -I../../../src/game/../shared -I../../../src/game/../shared/vmap -I../../../src/game/../realmd -DSYSCONFDIR=\\"/var/mangos/etc/\\"   -DDO_MYSQL -g -O2 -MT GridNotifiers.o -MD -MP -MF .deps/GridNotifiers.Tpo -c -o GridNotifiers.o ../../../src/game/GridNotifiers.cpp
../../../src/game/GridNotifiers.cpp: In member function ‘void MaNGOS::PlayerNotifier::Visit(PlayerMapType&)’:
../../../src/game/GridNotifiers.cpp:33: error: ‘class Player’ has no member named ‘GetViewPoint’
../../../src/game/GridNotifiers.cpp:41: error: ‘class Player’ has no member named ‘GetViewPoint’
../../../src/game/GridNotifiers.cpp: At global scope:
../../../src/game/GridNotifiers.cpp:47: error: prototype for ‘void MaNGOS::VisibleChangesNotifier::Visit(PlayerMapType&)’ does not match any in class ‘MaNGOS::VisibleChangesNotifier’
../../../src/game/GridNotifiers.h:67: error: candidates are: void MaNGOS::VisibleChangesNotifier::Visit(CameraMapType&)
../../../src/game/GridNotifiers.h:66: error:                 template<class T> void MaNGOS::VisibleChangesNotifier::Visit(GridRefManager<OBJECT>&)
make[3]: *** [GridNotifiers.o] Fehler 1
make[3]: Leaving directory `/home/mangos/clean9691/objdir/src/game'
make[2]: *** [all-recursive] Fehler 1
make[2]: Leaving directory `/home/mangos/clean9691/objdir/src'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home/mangos/clean9691/objdir'
make: *** [all] Fehler 2
debian:/home/mangos/clean9691/objdir#

Link to comment
Share on other sites

I have found a bug with quests:

questgivers haven't the questgiver icon, if you are a normal player. And you can't accept some quests from questgivers, for example first deathknight quest.

with gm on, quests are working.

an error with this patch:

2010-04-25 19:52:04 ERROR:SESSION: received not allowed opcode CMSG_LFD_PLAYER_LOCK_INFO_REQUEST (0x036E)

Link to comment
Share on other sites

SilverIce

I tried to apply your patch in a fresh new mangos installation and I can't compile it (CentOS 5 distro gcc):

then mv -f ".deps/MovementGenerator.Tpo" ".deps/MovementGenerator.Po"; else rm -f ".deps/MovementGenerator.Tpo"; exit 1; fi

In file included from ../../../src/game/GridDefines.h:24,

from ../../../src/game/Camera.h:5,

from ../../../src/game/Object.h:28,

from ../../../src/game/Unit.h:23,

from ../../../src/game/MovementGenerator.cpp:20:

../../../src/game/../framework/GameSystem/GridObject.h:81:7: warning: no newline at end of file

In file included from ../../../src/game/Object.h:28,

from ../../../src/game/Unit.h:23,

from ../../../src/game/MovementGenerator.cpp:20:

../../../src/game/Camera.h:87:7: warning: no newline at end of file

if g++ -DHAVE_CONFIG_H -I. -I../../../src/game -I../.. -I../../../dep/ACE_wrappers -I../../dep/ACE_wrappers -I/usr/include/mysql -I/usr/kerberos/include -I../../src/shared -I../../../src/game -I../../../src/game/../../dep/include -I../../../src/game/../framework -I../../../src/game/../shared -I../../../src/game/../shared/vmap -I../../../src/game/../realmd -DSYSCONFDIR=\\"/opt/mangos/etc/\\" -DDO_MYSQL -g -O2 -MT MovementHandler.o -MD -MP -MF ".deps/MovementHandler.Tpo" -c -o MovementHandler.o ../../../src/game/MovementHandler.cpp; \\

then mv -f ".deps/MovementHandler.Tpo" ".deps/MovementHandler.Po"; else rm -f ".deps/MovementHandler.Tpo"; exit 1; fi

In file included from ../../../src/game/GridDefines.h:24,

from ../../../src/game/Camera.h:5,

from ../../../src/game/Object.h:28,

from ../../../src/game/Corpse.h:22,

from ../../../src/game/MovementHandler.cpp:24:

../../../src/game/../framework/GameSystem/GridObject.h:81:7: warning: no newline at end of file

In file included from ../../../src/game/Object.h:28,

from ../../../src/game/Corpse.h:22,

from ../../../src/game/MovementHandler.cpp:24:

../../../src/game/Camera.h:87:7: warning: no newline at end of file

../../../src/game/MovementHandler.cpp: In member function ‘void WorldSession::HandleMountSpecialAnimOpcode(WorldPacket&)’:

../../../src/game/MovementHandler.cpp:501: error: ‘mover’ was not declared in this scope

make[3]: *** [MovementHandler.o] Error 1

make[3]: Leaving directory `/mangos/objdir/src/game'

make[2]: *** [all-recursive] Error 1

make[2]: Leaving directory `/mangos/objdir/src'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/mangos/objdir'

make: *** [all] Error 2

I had to manually patch the files GridNotifiers.cpp and MovimentHandler.cpp because of some FAILS when trying to "patch -p1 < blablabla".

here:

patch -p1 < c_9777.diff

patching file src/framework/GameSystem/Grid.h

patching file src/framework/GameSystem/GridObject.h

patching file src/framework/GameSystem/NGrid.h

patching file src/framework/GameSystem/TypeContainerVisitor.h

patching file src/framework/Makefile.am

patching file src/game/AchievementMgr.cpp

patching file src/game/Camera.cpp

patching file src/game/Camera.h

patching file src/game/Cell.h

patching file src/game/CellImpl.h

patching file src/game/ChatHandler.cpp

patching file src/game/Corpse.cpp

patching file src/game/Corpse.h

patching file src/game/Creature.cpp

patching file src/game/Creature.h

patching file src/game/DynamicObject.cpp

patching file src/game/DynamicObject.h

patching file src/game/GameObject.cpp

patching file src/game/GameObject.h

patching file src/game/GridDefines.h

patching file src/game/GridNotifiers.cpp

Hunk #5 FAILED at 103.

1 out of 5 hunks FAILED -- saving rejects to file src/game/GridNotifiers.cpp.rej

patching file src/game/GridNotifiers.h

Hunk #4 succeeded at 105 (offset 13 lines).

Hunk #6 succeeded at 129 (offset 13 lines).

patching file src/game/GridNotifiersImpl.h

patching file src/game/Group.cpp

patching file src/game/Makefile.am

patching file src/game/Map.cpp

patching file src/game/Map.h

patching file src/game/MovementHandler.cpp

Hunk #1 FAILED at 305.

1 out of 1 hunk FAILED -- saving rejects to file src/game/MovementHandler.cpp.rej

patching file src/game/NPCHandler.cpp

patching file src/game/Object.cpp

Hunk #4 succeeded at 1897 (offset 9 lines).

Hunk #6 succeeded at 1970 (offset 9 lines).

patching file src/game/Object.h

Hunk #3 succeeded at 428 with fuzz 1.

Hunk #4 succeeded at 478 (offset 1 line).

patching file src/game/ObjectAccessor.cpp

patching file src/game/ObjectGridLoader.cpp

patching file src/game/Pet.cpp

patching file src/game/Player.cpp

patching file src/game/Player.h

patching file src/game/Spell.cpp

patching file src/game/SpellAuras.cpp

patching file src/game/SpellEffects.cpp

patching file src/game/Unit.cpp

patching file src/game/Vehicle.cpp

patching file win/VC90/framework.vcproj

patching file win/VC90/game.vcproj

Thank you in advance!

Link to comment
Share on other sites

Perfect! thank u very much SilverIce!

compiling... I'll test that.

U r the best. thank u very much!

Oh, so sad...

../../../../src/bindings/ScriptDev2/../../game/CellImpl.h: In member function 'void Cell::Visit(const CellPair&, V&, Map&, const WorldObject&, float) const [with V = int]':

../../../../src/bindings/ScriptDev2/include/sc_creature.cpp:468: instantiated from here

../../../../src/bindings/ScriptDev2/../../game/CellImpl.h:178: error: no matching function for call to 'Map::Visit(const Cell&, int&)'

../../../../src/bindings/ScriptDev2/../../game/CellImpl.h:190: error: no matching function for call to 'Map::Visit(const Cell&, int&)'

../../../../src/bindings/ScriptDev2/include/sc_creature.cpp:468: instantiated from here

../../../../src/bindings/ScriptDev2/../../game/CellImpl.h:210: error: no matching function for call to 'Map::Visit(const Cell&, int&)'

../../../../src/bindings/ScriptDev2/include/sc_creature.cpp:468: instantiated from here

../../../../src/bindings/ScriptDev2/../../game/CellImpl.h:223: error: no matching function for call to 'Map::Visit(Cell&, int&)'

../../../../src/bindings/ScriptDev2/../../game/CellImpl.h: In member function 'void Cell::VisitCircle(V&, Map&, const CellPair&, const CellPair&) const [with V = int]':

../../../../src/bindings/ScriptDev2/../../game/CellImpl.h:204: instantiated from 'void Cell::Visit(const CellPair&, V&, Map&, const WorldObject&, float) const [with V = int]'

../../../../src/bindings/ScriptDev2/include/sc_creature.cpp:468: instantiated from here

../../../../src/bindings/ScriptDev2/../../game/CellImpl.h:247: error: no matching function for call to 'Map::Visit(Cell&, int&)'

../../../../src/bindings/ScriptDev2/../../game/CellImpl.h:271: error: no matching function for call to 'Map::Visit(Cell&, int&)'

../../../../src/bindings/ScriptDev2/../../game/CellImpl.h:277: error: no matching function for call to 'Map::Visit(Cell&, int&)'

make[6]: *** [sc_creature.lo] Error 1

Now it appears to be something with scriptdev2.

Again, last mangos, last scriptdev from git/svn

ty in advance

Link to comment
Share on other sites

I fetched your camera patch from your repo, Cameras_up_to_date, and encountered whitespace errors at lines 395 and 501.

At line 395 there are four spaces following an open bracket {.

At line 501 there is an otherwise blank line that starts with four spaces.

Fixed and the patch merged with no other errors into MaNGOS [9798].

I sincerely hope those who are working on the Eye Of Acherus patch will utilize your work, SilverIce. You've done a small but important fix, which are the most needed of all. May the devs take notice of this one! :)

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