Jump to content

Vehicles (Dev)


Guest AuntieMangos

Recommended Posts

The answer is very simple, or atleast simeple in my case. I didn't know that you could do that :). I'm sure like most the knowlage that we (The royal we) have about git is very limited. Can you explain what rebase does.. and or maybe the advantages of doing with rebase. :).

Link to comment
Share on other sites

  • Replies 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

50 objects were added to complete this thin pack.
Auto-merged src/game/Creature.cpp
Auto-merged src/game/GameObject.cpp
Auto-merged src/game/Map.cpp
Auto-merged src/game/Map.h
Auto-merged src/game/MiscHandler.cpp
Auto-merged src/game/MovementHandler.cpp
Auto-merged src/game/ObjectMgr.cpp
Auto-merged src/game/ObjectMgr.h
Auto-merged src/game/Player.cpp
Auto-merged src/game/RandomMovementGenerator.cpp
CONFLICT (content): Merge conflict in src/game/RandomMovementGenerator.cpp
Auto-merged src/game/SharedDefines.h
Auto-merged src/game/Spell.cpp
CONFLICT (content): Merge conflict in src/game/Spell.cpp
Auto-merged src/game/Spell.h
Auto-merged src/game/SpellAuras.cpp
Auto-merged src/game/SpellEffects.cpp
Auto-merged src/game/Unit.cpp
Automatic merge failed; fix conflicts and then commit the result.

With last mangos rev

Link to comment
Share on other sites

not to be condescending like is known to happen... but redss, and anyone who wishes to poste errors in the future... could you please show the specific errors? the code u posted is mostly useless... open RandomMovementGenerator.cpp and Spell.cpp look for the merge break ( <<<<<<HEAD ) then copy an paste what is included between the <<<<<<HEAD and the >>>>>>>> symbols here in the thread. THIS, show the errors that are taking place and will help deduce how to repair them. More likely than not, the merge-breaks arent serious and only need minor edits and re-merge.

Link to comment
Share on other sites

Exception code: C0000005 ACCESS_VIOLATION

Fault address: 00408079 01:00007079 C:\\mangos\\mangosd.exe

Registers:

EAX:00000000

EBX:6FFC4D38

ECX:0000002C

EDX:0000002C

ESI:00000000

EDI:008A1D20

CS:EIP:001B:00408079

SS:ESP:0023:0A51E58C EBP:0A51E598

DS:0023 ES:0023 FS:003B GS:0000

Flags:00010297

Call stack:

Address Frame Function SourceFile

00408079 00000000 Creature::GetPetAutoSpellOnPos+29

0088878E 00000000 PetAI::UpdateAI+62E

00659645 00000000 Creature::Update+505

0066F8F2 00000000 Vehicle::Update+22

004C5F4F 00000000 MaNGOS::ObjectUpdater::Visit+6F

004C5ED2 00000000 VisitorHelper<MaNGOS::ObjectUpdater,Creature>+12

004C5480 00000000 VisitorHelper<MaNGOS::ObjectUpdater,Creature,TypeList<Corpse,TypeNull> >+10

004C4F03 00000000 VisitorHelper<MaNGOS::ObjectUpdater,Player,TypeList<Creature,TypeList<Corpse,TypeNull> > >+23

004C4960 00000000 VisitorHelper<MaNGOS::ObjectUpdater,TypeList<Player,TypeList<Creature,TypeList<Corpse,TypeNull> > > >+10

004C0402 00000000 Map::Visit<MaNGOS::SingleThreaded<ACE_RW_Thread_Mutex>::Lock,MaNGOS::ObjectUpdater,TypeMapContainer<TypeList<Player,TypeList<Creature,TypeList<Corpse,TypeNull> > > > >+102

004BAAE6 00000000 Cell::Visit<MaNGOS::SingleThreaded<ACE_RW_Thread_Mutex>::Lock,MaNGOS::ObjectUpdater,TypeMapContainer<TypeList<Player,TypeList<Creature,TypeList<Corpse,TypeNull> > > > >+56

004A12E4 00000000 Map::Update+374

006173C8 00000000 MapManager::Update+128

005FB197 00000000 World::Update+787

00430B7E 00000000 WorldRunnable::run+8E

008A1D39 00000000 ACE_Based::Thread::ThreadTask+19

002F14D4 00000000 __WSAFDIsSet+FFFFFFFFFFFCC45C

78543433 00000000 _endthreadex+44

785434C7 00000000 _endthreadex+D8

7C7DB729 00000000 GetModuleFileNameA+1BA

crash.

Realm of Shadows vehicle problem. 28782.

Link to comment
Share on other sites

erazare,

<<<<<<< HEAD:src/game/RandomMovementGenerator.cpp
   if (creature.hasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED | UNIT_STAT_DISTRACTED | UNIT_STAT_DIED))
=======
   if(creature.hasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED | UNIT_STAT_DISTRACTED | UNIT_STAT_DIED | UNIT_STAT_ON_VEHICLE))
>>>>>>> 14157813e9d4443a33602762fe44ba1a5682ee66:src/game/RandomMovementGenerator.cpp

<<<<<<< HEAD:src/game/Spell.cpp
       case TARGET_AREAEFFECT_CUSTOM_2:
=======
       case TARGET_SUMMON:
>>>>>>> 14157813e9d4443a33602762fe44ba1a5682ee66:src/game/Spell.cpp

Link to comment
Share on other sites

in almost all cases, if near the ======= you have duplicate code above and below.. or close to duplicate; the code above the ======= is the correct code and the code below it is not. however this is not always the case as by your RandomMovementGenerator.cpp example:

your first codebox:

<<<<<<< HEAD:src/game/RandomMovementGenerator.cpp
   if (creature.hasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED | UNIT_STAT_DISTRACTED | UNIT_STAT_DIED))
=======
   if(creature.hasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED | UNIT_STAT_DISTRACTED | UNIT_STAT_DIED | UNIT_STAT_ON_VEHICLE))
>>>>>>> 14157813e9d4443a33602762fe44ba1a5682ee66:src/game/RandomMovementGenerator.cpp

you will want to eliminate the code after the =======, so what you do is simply delete the deadcode as well as the MERGE identifiers ( <<<<<HEAD, =======, and >>>>>>> [merge-text] ) like so:

correct code:

      if(creature.hasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED | UNIT_STAT_DISTRACTED | UNIT_STAT_DIED | UNIT_STAT_ON_VEHICLE))
   {
       i_nextMoveTime.Update(i_nextMoveTime.GetExpiry());    // Expire the timer
       creature.clearUnitState(UNIT_STAT_ROAMING);
       return true;
   }

in the second example its a little deeper. First of all that blob isnt complete.. beneath ">>>>>>> 14157813e9d4443a33602762fe44ba1a5682ee66:src/game/Spell.cpp" it goes directly into a code snippet correct? what you need to do is look at that whole array section and make sure there are no duplicate codesets in that general area. If there are follow the above rule of thumb. However in this particular instance, the correct code for this area of Spell.cpp is as such:

       case TARGET_TOTEM_EARTH:
       case TARGET_TOTEM_WATER:
       case TARGET_TOTEM_AIR:
       case TARGET_TOTEM_FIRE:
       case TARGET_SELF:
       case TARGET_SELF2:
       case TARGET_AREAEFFECT_CUSTOM:
       case TARGET_AREAEFFECT_CUSTOM_2:
           targetUnitMap.push_back(m_caster);
           break;
       case TARGET_RANDOM_ENEMY_CHAIN_IN_AREA:
       {
           m_targets.m_targetMask = 0;
           unMaxTargets = EffectChainTarget;
           float max_range = radius + unMaxTargets * CHAIN_SPELL_JUMP_RADIUS;

           CellPair p(MaNGOS::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY()));
           Cell cell(p);
           cell.data.Part.reserved = ALL_DISTRICT;
           cell.SetNoCreate();

           std::list<Unit *> tempTargetUnitMap;

           {
               MaNGOS::AnyAoETargetUnitInObjectRangeCheck u_check(m_caster, m_caster, max_range);
               MaNGOS::UnitListSearcher<MaNGOS::AnyAoETargetUnitInObjectRangeCheck> searcher(m_caster, tempTargetUnitMap, u_check);

               TypeContainerVisitor<MaNGOS::UnitListSearcher<MaNGOS::AnyAoETargetUnitInObjectRangeCheck>, WorldTypeMapContainer > world_unit_searcher(searcher);
               TypeContainerVisitor<MaNGOS::UnitListSearcher<MaNGOS::AnyAoETargetUnitInObjectRangeCheck>, GridTypeMapContainer >  grid_unit_searcher(searcher);

               CellLock<GridReadGuard> cell_lock(cell, p);
               cell_lock->Visit(cell_lock, world_unit_searcher, *m_caster->GetMap(), *m_caster, max_range);
               cell_lock->Visit(cell_lock, grid_unit_searcher, *m_caster->GetMap(), *m_caster, max_range);
           }

notice TARGET SUMMON gets removed and then the code goes as usual... I am unsure how the TARGET_SUMMON code even gets in there unless its more dirty code from prior merges... Wojita there is quite a bit of scrap code turning up in your repo as of late... bad rebases?

Link to comment
Share on other sites

it has been my practice that I download a clean repo of the git I am trying to merge in a seperate directory. then when a merge flaw occurs I can look up the file that is being merged and I can look up a clean merged copy of the file in the backup directory and visually compare how the codesets should look. then its just a simple matter of cleaning up the merge. if you are merging several different modifications be sure to check all the diff modifications copies of the files for the correct codesets.. it might take a little longer than other methods but it is crystal clear and produces a lot less failed builds.

Link to comment
Share on other sites

to create patch file, use:

git clone git://github.com/mangos/mangos.git
cd mangos
git checkout -b (chose what u want, i took rev. nr)9088 09428ebad23b2d408cbb20d2608aa988cd473b0e 
git checkout -b vehicle
git pull git://github.com/Tasssadar/Valhalla-Project.git vehicle 
git diff -p 9088 vehicle > vehicle.patch

If git://github.com/Tasssadar/Valhalla-Project.git switch to an another revision, you need to modify this in part 3 too, to avoid merge bugs.

If I use Karatel's patches should I replace git-address from 'mangos' to 'insider42' or not?

And I use YTDB (from:http://ytdb.ru/showthread.php?t=2), so what rev I should to take?

Link to comment
Share on other sites

Anti just a little question, did the Tasssadar repo change to the 3.3 branch or am I missing something? I can't get it to play nice with any of the other core mods like Dual Spec, AHbot, or even the main MaNGOS core updates, I get it to merge and keep getting compiler failures left and right. Its' been driving me nuts and because of the fails I haven't had vehicles compiled in for about 2 weeks.

Link to comment
Share on other sites

Anti just a little question, did the Tasssadar repo change to the 3.3 branch or am I missing something? I can't get it to play nice with any of the other core mods like Dual Spec, AHbot, or even the main MaNGOS core updates, I get it to merge and keep getting compiler failures left and right. Its' been driving me nuts and because of the fails I haven't had vehicles compiled in for about 2 weeks.

I am convinced that there is something wrong with the vehicle repo... am thinking that they have customized it too much to fit the Valhalla-Project and its losing touch with the mangos repo... I have to clean the code every time i pull the vehicle git and usually it only works right if i rebase

Link to comment
Share on other sites

mangos suport 3.3A

game\\Unit.cpp

   if(GetTypeId() == TYPEID_PLAYER)
       unitPlayer = (Player*)this;
   else if(((Creature*)this)->isVehicle())
       unitPlayer = GetCharmer();
   else
       unitPlayer = NULL;

@Anti

it is possible to see this "cannot convert from 'Unit *' to 'Player *'"!

Link to comment
Share on other sites

mangos suport 3.3A

game\\Unit.cpp

   if(GetTypeId() == TYPEID_PLAYER)
       unitPlayer = (Player*)this;
   else if(((Creature*)this)->isVehicle())
       unitPlayer = GetCharmer();
   else
       unitPlayer = NULL;

@Anti

it is possible to see this "cannot convert from 'Unit *' to 'Player *'"!

This error pop's up 3 times in my compile and 2 other errors in spell.cpp along with what I think may be related to a bad merge where it can't open a couple files for complie.

Link to comment
Share on other sites

strange you should be having this problem... must exist in newer revs of vehicle... I pulled from the git around the area of 9086 and then updated it to 9141 with a few minor merge edits which was seriously just cleaning the merges and voila works like a charm on 9141.

you might want to pull an older rev of vehicle to update to 9141 til Tasssadar or another person workin on this dev finds an answer

edit:

Try this repo release from tasssadar, then update IT to 330 and you should be fine:

http://github.com/Tasssadar/Valhalla-Project/commit/14157813e9d4443a33602762fe44ba1a5682ee66

Link to comment
Share on other sites

    if(GetTypeId() == TYPEID_PLAYER)
       unitPlayer = (Player*)this;
   else if(((Creature*)this)->isVehicle())
       unitPlayer = GetCharmer();
   else
       unitPlayer = NULL;

to

    if(GetTypeId() == TYPEID_PLAYER)
       unitPlayer = (Player*)this;
   else if(((Creature*)this)->isVehicle())
       unitPlayer = (Player*)GetCharmer();
   else
       unitPlayer = NULL;

just want to be sure to note that the code comes up twice in unit.cpp make sure you edit both sections of code to match the above

Link to comment
Share on other sites

@DaemonCantor

You did a test before to say?

Yes I did, many test's I pulled the Main branch and did a pull from Tasssadar with recursive merge, and then used sajia's fix, compiled with no errors, then I pulled Tasssadar's branch into a seporate repo and updated it with the main mangos branch fixed it again and compiled with no errors, then I started with kaxias's branch and cleaned it up ( Tasssadar's branch is a mess) compiled it with no problems then fired up to see all errors and all I got was DB errors from items and critters (low hp and mana) then I did the same with Naicisum's ahbot with same results but when I went to playerbot I had about 4 merge errors and 50 compiler errors so I backed out of it and SCREAMED for help from blueboy....lol and I've had the server up and running for about 2 hours now total with no problems and needing to check mounts out yet but I'm pretty shure I can't use the Ulduar or Argent tourny mounts yet because I don't yet know how to get them working.

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