-
Posts
125 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by Torres
-
-
-
Hello dear developers!
If I want the player to pass through rocks and mountains, which source code should I modify? Because I want to develop an automatic pathfinding (the player can click on the map to move there), my current difficulty is that it will always be blocked by rocks and mountains!
Best wishes to you, thank you- 2
-
9 hours ago, CantSt0p said:
cool
-
Hello, dear developers!
I want the player to pass through the body of the monster, should I edit,
client? or game? Thank you for your help and best wishes to you!- 1
-
I started with a few developers, when I entered their test server, each has its own strengths, I am still comparing and considering, when the transaction starts, I will publish the entire project
- 1
-
Thank you, brother!
-
I want to customize a whole set of files containing (werewolves and elves)
It includes client source, binaries, game%mysql,
Depending on system/dungeon/ and cleanliness (0 bugs)
The money I am willing to pay is 1000 euros - 3000 euros
My discord: torres#1801- 1
-
On 10/16/2022 at 10:46 AM, Amun said:
You're getting that error because the client can't find the index of your character's hair which, most likely, might be because it doesn't actually exist in pack.
Both select and game phases receive the index(vnum) of your hair from the database(player->player->part_hair, as SirEldar mentioned) when HEADER_GC_CHARACTER_DETAILS is sent from the server(if I remember correctly), and attach them to your character by calling chr.SetHair(details.part_hair, which is the vnum).
What I would do if I were you is check to see if you have the vnum(18841) in item_proto, item_list and race.msm, then check to see if the skin exists in pack(item/hair).
To avoid showing up with no head when a skin is missing, we should probably have some sort of fallback to default when it can't find the current hair.
Good luck,
- Amun
Supplement: The error message is that the hair is missing. In fact, the clothes display is not the same as in the game. I think it should be a problem in the binary-db, but I can't find it lol
-
17 hours ago, ReFresh said:
I just read the comments before... I recommend to compare some .cpp files with another files and maybe python files too.
I've tried a lot, it's not an easy job
-
This is so hard, is there a boss who can help me? Thx
- 1
-
5 hours ago, Amun said:
[1]. https://imgur.com/ or https://metin2.download/manage/picture/add/
[2]. No. I already told you what to do.
https://metin2.download/picture/IJfNC3Bw059iZJ3TVXb4S4H7YpQ29JJT/.png
-
On 10/16/2022 at 4:46 PM, Amun said:
You're getting that error because the client can't find the index of your character's hair which, most likely, might be because it doesn't actually exist in pack.
Both select and game phases receive the index(vnum) of your hair from the database(player->player->part_hair, as SirEldar mentioned) when HEADER_GC_CHARACTER_DETAILS is sent from the server(if I remember correctly), and attach them to your character by calling chr.SetHair(details.part_hair, which is the vnum).
What I would do if I were you is check to see if you have the vnum(18841) in item_proto, item_list and race.msm, then check to see if the skin exists in pack(item/hair).
To avoid showing up with no head when a skin is missing, we should probably have some sort of fallback to default when it can't find the current hair.
Good luck,
- Amun
I'm using the new character login interface (interface), when I translated from english and used the chinese epk, but I don't know how to show you the error (upload a picture), so this problem has been bugging me, thank you Answer, can you teamviewer show me the error?
On 10/17/2022 at 12:06 AM, TAUMP said:I accidentally deleted SetHair in the client once and I didn't have hair often either (I don't even now irl). No compile error, maybe it's your error in the binary.
Thank you for your answer, best wishes to you!
-
10 hours ago, Syreldar said:
My guess is that the index you're using for that specific hair is probably greater than 32767 for some reason.
If that's the case, you got two solutions:
- Either lower the hair index, both in the protos and in the root msm. (Recommended solution)
-
Or, apply this query
ALTER TABLE `player`.`player` MODIFY COLUMN `part_hair` int NOT NULL DEFAULT '' AFTER `part_base`;
Thank you!I'm using the new login and role selection interface, I didn't have this problem before, I can't send you pictures, lol
-
8 minutes ago, Ulas said:
This is not problem just this steps reason
1.Change hair
2.reboot
and your character head baldjust
3 minutes ago, Ulas said:Hair models in .epk
I told u ingame create character and test itIt's just wrong in the login interface, select the interface of the character, and enter the game is normal hair lol
-
3 minutes ago, Ulas said:
This is not problem just this steps reason
1.Change hair
2.reboot
and your character head baldhow Change hair?in .epk? in binary?
-
@Ulas in pack?or game souce? Can you tell me the detailed steps? thank you!
3 minutes ago, Ulas said:If you can change hair model and reboot server normal change character and test
thanks
-
Hello, dear developers! My client, the login interface sometimes has some errors like this, look at the picture, there is no hair Error message:
1012 15:02:04730 :: Hair number 18441 is not exist. 1012 15:02:04734 :: Hair number 18441 is not exist. 1012 15:02:04734 :: Hair number 18441 is not exist. 1012 15:03:15831 :: Unknown Server Command BORRAR QID|28 | BORRAR
Please how can I fix it? Thanks!
-
@joshi,thanks ,but RaceData.h in client no find job_wolfman,
-
Hi,devs
Today I activated my werewolf, but I couldn't create it. I used / RACE job 5 and saw the werewolf, but the game was closed. Can you help me? Where should I fix it, thanks
Best wishes to you0325 22:41:05666 :: CItemManager::LoadItemList(locale/cibn10/item_list.txt) - StrangeLine in 9194 0325 22:41:05666 :: CItemManager::LoadItemList(locale/cibn10/item_list.txt) - StrangeLine in 9195 0325 22:41:18190 :: CEffectManager::RegisterEffect - LoadScript(d:/ymir work/pc/warrior/effect/gi_long_sword.mse) Error 0325 22:41:18284 :: CRaceData::RegisterMotionData - LoadMotionData(c_szFileName=d:/ymir work/pc/warrior/skill/gihyeol_2.msa) ERROR 0325 22:41:18308 :: CRaceData::RegisterMotionData - LoadMotionData(c_szFileName=d:/ymir work/pc/warrior/skill/noegeom_2.msa) ERROR 0325 22:41:18335 :: CRaceData::RegisterMotionData - LoadMotionData(c_szFileName=d:/ymir work/pc/warrior/skill/gihyeol_3.msa) ERROR 0325 22:41:18362 :: CRaceData::RegisterMotionData - LoadMotionData(c_szFileName=d:/ymir work/pc/warrior/skill/noegeom_3.msa) ERROR 0325 22:41:18390 :: CRaceData::RegisterMotionData - LoadMotionData(c_szFileName=d:/ymir work/pc/warrior/skill/gihyeol_4.msa) ERROR 0325 22:41:18423 :: CRaceData::RegisterMotionData - LoadMotionData(c_szFileName=d:/ymir work/pc/warrior/skill/noegeom_4.msa) ERROR 0325 22:41:18891 :: CEffectManager::RegisterEffect - LoadScript(d:/metin2data/season1/effect/pc/warrior/effect/spark.mse) Error 0325 22:41:18891 :: CEffectManager::RegisterEffect - LoadScript(d:/ymir work/pc/warrior/effect/gi_long_sword.mse) Error 0325 22:41:18949 :: CEffectManager::RegisterEffect - LoadScript(d:/metin2data/season1/effect/pc/warrior/effect/spark_2.mse) Error 0325 22:41:18949 :: CEffectManager::RegisterEffect - LoadScript(d:/ymir work/pc/warrior/effect/gi_long_sword.mse) Error 0325 22:41:18971 :: CEffectManager::RegisterEffect - LoadScript(d:/metin2data/season1/effect/pc/warrior/effect/spark_3.mse) Error 0325 22:41:18971 :: CEffectManager::RegisterEffect - LoadScript(d:/ymir work/pc/warrior/effect/gi_long_sword.mse) Error 0325 22:41:18993 :: CEffectManager::RegisterEffect - LoadScript(d:/metin2data/season1/effect/pc/warrior/effect/spark_4.mse) Error 0325 22:41:18993 :: CEffectManager::RegisterEffect - LoadScript(d:/ymir work/pc/warrior/effect/gi_long_sword.mse) Error 0325 22:41:18993 :: CEffectManager::RegisterEffect - LoadScript(d:/metin2data/season1/effect/pc/warrior/effect/gihyeol_4.mse) Error 0325 22:41:18999 :: CEffectManager::RegisterEffect - LoadScript(d:/metin2data/season1/effect/pc/warrior/effect/noegeomdorae_4.mse) Error 0325 22:41:19000 :: CEffectManager::RegisterEffect - LoadScript(d:/metin2data/season1/effect/pc/warrior/effect/noegeomdorae_loop_4.mse) Error 0325 22:41:19511 :: CRaceData::RegisterMotionData - LoadMotionData(c_szFileName=d:/ymir work/pc/assassin/skill/seomjeon_2.msa) ERROR 0325 22:41:19572 :: CRaceData::RegisterMotionData - LoadMotionData(c_szFileName=d:/ymir work/pc/assassin/skill/seomjeon_3.msa) ERROR 0325 22:41:19639 :: CRaceData::RegisterMotionData - LoadMotionData(c_szFileName=d:/ymir work/pc/assassin/skill/seomjeon_4.msa) ERROR 0325 22:41:19671 :: CRaceData::RegisterMotionData - LoadMotionData(c_szFileName=d:/ymir work/pc/assassin/skill/seomgwang_4.msa) ERROR 0325 22:41:20198 :: CRaceData::RegisterMotionData - LoadMotionData(c_szFileName=d:/ymir work/pc2/assassin/skill/seomjeon_2.msa) ERROR 0325 22:41:20208 :: CRaceData::RegisterMotionData - LoadMotionData(c_szFileName=d:/ymir work/pc2/assassin/skill/seomjeon_3.msa) ERROR 0325 22:41:20217 :: CRaceData::RegisterMotionData - LoadMotionData(c_szFileName=d:/ymir work/pc2/assassin/skill/seomjeon_4.msa) ERROR 0325 22:41:20223 :: CEffectManager::RegisterEffect - LoadScript(d:/metin2data/season1/effect/pc/assassin/effect/seomgwang_hand_4.mse) Error 0325 22:41:20223 :: CEffectManager::RegisterEffect - LoadScript(d:/metin2data/season1/effect/pc/assassin/effect/seomgwang_blow_4.mse) Error 0325 22:42:22832 :: CPythonPlayer::SetItemData(window_type : 9, dwSlotIndex=9, itemIndex=71084) - Failed to item data 0325 22:42:22832 :: CPythonPlayer::SetItemData(window_type : 9, dwSlotIndex=5, itemIndex=71084) - Failed to item data 0325 22:42:22832 :: CPythonPlayer::SetItemData(window_type : 9, dwSlotIndex=6, itemIndex=71084) - Failed to item data 0325 22:42:22832 :: CPythonPlayer::SetItemData(window_type : 9, dwSlotIndex=2, itemIndex=71084) - Failed to item data 0325 22:42:22832 :: CPythonPlayer::SetItemData(window_type : 9, dwSlotIndex=1, itemIndex=71084) - Failed to item data 0325 22:42:22832 :: CPythonPlayer::SetItemData(window_type : 9, dwSlotIndex=4, itemIndex=71084) - Failed to item data 0325 22:42:22832 :: CPythonPlayer::SetItemData(window_type : 9, dwSlotIndex=3, itemIndex=71084) - Failed to item data 0325 22:42:22832 :: CPythonPlayer::SetItemData(window_type : 9, dwSlotIndex=0, itemIndex=71084) - Failed to item data 0325 22:42:22832 :: CPythonPlayer::SetItemData(window_type : 9, dwSlotIndex=10, itemIndex=71084) - Failed to item data 0325 22:42:23443 :: CRaceData::RegisterMotionData - LoadMotionData(c_szFileName=d:/ymir work/pc3/wolfman/skill/split_slash_4.msa) ERROR 0325 22:42:23443 :: CRaceData::RegisterMotionData - LoadMotionData(c_szFileName=d:/ymir work/pc3/wolfman/skill/wind_death_4.msa) ERROR 0325 22:42:23443 :: CRaceData::RegisterMotionData - LoadMotionData(c_szFileName=d:/ymir work/pc3/wolfman/skill/reef_attack_4.msa) ERROR 0325 22:42:23443 :: CRaceData::RegisterMotionData - LoadMotionData(c_szFileName=d:/ymir work/pc3/wolfman/skill/wreckage_4.msa) ERROR 0325 22:42:23444 :: CRaceData::RegisterMotionData - LoadMotionData(c_szFileName=d:/ymir work/pc3/wolfman/skill/red_possession_4.msa) ERROR 0325 22:42:23444 :: CRaceData::RegisterMotionData - LoadMotionData(c_szFileName=d:/ymir work/pc3/wolfman/skill/blue_possession_4.msa) ERROR 0325 22:42:25042 :: CRaceManager::RegisterRacePath : RACE[20303] LOAD MSMFILE[d:/ymir work/npc/chaoss_hunt_girl/chaoss_hunt_girl.msm] ERROR. Will Find Another Path. 0325 22:42:25042 :: CRaceManager::RegisterRacePath : RACE[20303] LOAD MSMFILE[d:/ymir work/npc_mount/chaoss_hunt_girl/chaoss_hunt_girl.msm] ERROR. Will Find Another Path. 0325 22:42:31536 :: Traceback (most recent call last): 0325 22:42:31536 :: File "ui.py", line 1211, in OnIMEOpenCandidateList 0325 22:42:31537 :: File "uiCandidate.py", line 88, in Refresh 0325 22:42:31537 :: File "uiCandidate.py", line 79, in Append 0325 22:42:31537 :: File "ui.py", line 764, in AppendItem 0325 22:42:31537 :: File "ui.py", line 506, in AppendItem 0325 22:42:31537 :: TypeError 0325 22:42:31537 :: : 0325 22:42:31537 :: GetItemViewCoord() takes exactly 2 arguments (3 given) 0325 22:42:31537 :: 0325 22:42:31540 :: Traceback (most recent call last): 0325 22:42:31540 :: File "ui.py", line 1211, in OnIMEOpenCandidateList 0325 22:42:31540 :: File "uiCandidate.py", line 88, in Refresh 0325 22:42:31540 :: File "uiCandidate.py", line 79, in Append 0325 22:42:31540 :: File "ui.py", line 764, in AppendItem 0325 22:42:31540 :: File "ui.py", line 506, in AppendItem 0325 22:42:31540 :: TypeError 0325 22:42:31540 :: : 0325 22:42:31540 :: GetItemViewCoord() takes exactly 2 arguments (3 given) 0325 22:42:31540 :: 0325 22:42:31543 :: Traceback (most recent call last): 0325 22:42:31543 :: File "ui.py", line 1211, in OnIMEOpenCandidateList 0325 22:42:31543 :: File "uiCandidate.py", line 88, in Refresh 0325 22:42:31543 :: File "uiCandidate.py", line 79, in Append 0325 22:42:31543 :: File "ui.py", line 764, in AppendItem 0325 22:42:31543 :: File "ui.py", line 506, in AppendItem 0325 22:42:31543 :: TypeError 0325 22:42:31543 :: : 0325 22:42:31543 :: GetItemViewCoord() takes exactly 2 arguments (3 given) 0325 22:42:31543 :: 0325 22:43:25808 :: CRaceManager::RegisterRacePath : RACE[20248] LOAD MSMFILE[d:/ymir work/npc_mount/plechi_wild_mount00/plechi_wild_mount00.msm] ERROR. Will Find Another Path. 0325 22:43:18603 :: CItemManager::LoadItemList(locale/cibn10/item_list.txt) - StrangeLine in 9194 0325 22:43:18603 :: CItemManager::LoadItemList(locale/cibn10/item_list.txt) - StrangeLine in 9195 0325 22:44:41884 :: Traceback (most recent call last): 0325 22:44:41884 :: File "ui.py", line 1211, in OnIMEOpenCandidateList 0325 22:44:41884 :: File "uiCandidate.py", line 88, in Refresh 0325 22:44:41884 :: File "uiCandidate.py", line 79, in Append 0325 22:44:41884 :: File "ui.py", line 764, in AppendItem 0325 22:44:41884 :: File "ui.py", line 506, in AppendItem 0325 22:44:41885 :: TypeError 0325 22:44:41885 :: : 0325 22:44:41885 :: GetItemViewCoord() takes exactly 2 arguments (3 given) 0325 22:44:41885 :: 0325 22:44:41886 :: Traceback (most recent call last): 0325 22:44:41886 :: File "ui.py", line 1211, in OnIMEOpenCandidateList 0325 22:44:41886 :: File "uiCandidate.py", line 88, in Refresh 0325 22:44:41886 :: File "uiCandidate.py", line 79, in Append 0325 22:44:41886 :: File "ui.py", line 764, in AppendItem 0325 22:44:41886 :: File "ui.py", line 506, in AppendItem 0325 22:44:41886 :: TypeError 0325 22:44:41886 :: : 0325 22:44:41886 :: GetItemViewCoord() takes exactly 2 arguments (3 given) 0325 22:44:41886 :: 0325 22:44:41888 :: Traceback (most recent call last): 0325 22:44:41888 :: File "ui.py", line 1211, in OnIMEOpenCandidateList 0325 22:44:41888 :: File "uiCandidate.py", line 88, in Refresh 0325 22:44:41888 :: File "uiCandidate.py", line 79, in Append 0325 22:44:41888 :: File "ui.py", line 764, in AppendItem 0325 22:44:41888 :: File "ui.py", line 506, in AppendItem 0325 22:44:41888 :: TypeError 0325 22:44:41888 :: : 0325 22:44:41888 :: GetItemViewCoord() takes exactly 2 arguments (3 given) 0325 22:44:41888 :: 0325 22:44:42000 :: Traceback (most recent call last): 0325 22:44:42000 :: File "ui.py", line 1211, in OnIMEOpenCandidateList 0325 22:44:42000 :: File "uiCandidate.py", line 88, in Refresh 0325 22:44:42000 :: File "uiCandidate.py", line 79, in Append 0325 22:44:42000 :: File "ui.py", line 764, in AppendItem 0325 22:44:42001 :: File "ui.py", line 506, in AppendItem 0325 22:44:42001 :: TypeError 0325 22:44:42001 :: : 0325 22:44:42001 :: GetItemViewCoord() takes exactly 2 arguments (3 given) 0325 22:44:42001 :: 0325 22:44:42115 :: Traceback (most recent call last): 0325 22:44:42115 :: File "ui.py", line 1211, in OnIMEOpenCandidateList 0325 22:44:42115 :: File "uiCandidate.py", line 88, in Refresh 0325 22:44:42115 :: File "uiCandidate.py", line 79, in Append 0325 22:44:42115 :: File "ui.py", line 764, in AppendItem 0325 22:44:42115 :: File "ui.py", line 506, in AppendItem 0325 22:44:42115 :: TypeError 0325 22:44:42115 :: : 0325 22:44:42115 :: GetItemViewCoord() takes exactly 2 arguments (3 given) 0325 22:44:42115 :: 0325 22:44:42195 :: Traceback (most recent call last): 0325 22:44:42195 :: File "ui.py", line 1211, in OnIMEOpenCandidateList 0325 22:44:42195 :: File "uiCandidate.py", line 88, in Refresh 0325 22:44:42196 :: File "uiCandidate.py", line 79, in Append 0325 22:44:42196 :: File "ui.py", line 764, in AppendItem 0325 22:44:42196 :: File "ui.py", line 506, in AppendItem 0325 22:44:42196 :: TypeError 0325 22:44:42196 :: : 0325 22:44:42196 :: GetItemViewCoord() takes exactly 2 arguments (3 given) 0325 22:44:42196 :: 0325 22:44:42396 :: Traceback (most recent call last): 0325 22:44:42396 :: File "ui.py", line 1211, in OnIMEOpenCandidateList 0325 22:44:42396 :: File "uiCandidate.py", line 88, in Refresh 0325 22:44:42396 :: File "uiCandidate.py", line 79, in Append 0325 22:44:42396 :: File "ui.py", line 764, in AppendItem 0325 22:44:42397 :: File "ui.py", line 506, in AppendItem 0325 22:44:42397 :: TypeError 0325 22:44:42397 :: : 0325 22:44:42397 :: GetItemViewCoord() takes exactly 2 arguments (3 given) 0325 22:44:42397 :: 0325 22:44:42526 :: Traceback (most recent call last): 0325 22:44:42526 :: File "ui.py", line 1211, in OnIMEOpenCandidateList 0325 22:44:42526 :: File "uiCandidate.py", line 88, in Refresh 0325 22:44:42526 :: File "uiCandidate.py", line 79, in Append 0325 22:44:42526 :: File "ui.py", line 764, in AppendItem 0325 22:44:42526 :: File "ui.py", line 506, in AppendItem 0325 22:44:42526 :: TypeError 0325 22:44:42526 :: : 0325 22:44:42526 :: GetItemViewCoord() takes exactly 2 arguments (3 given) 0325 22:44:42526 :: 0325 22:44:42608 :: Traceback (most recent call last): 0325 22:44:42608 :: File "ui.py", line 1211, in OnIMEOpenCandidateList 0325 22:44:42608 :: File "uiCandidate.py", line 88, in Refresh 0325 22:44:42608 :: File "uiCandidate.py", line 79, in Append 0325 22:44:42608 :: File "ui.py", line 764, in AppendItem 0325 22:44:42609 :: File "ui.py", line 506, in AppendItem 0325 22:44:42609 :: TypeError 0325 22:44:42609 :: : 0325 22:44:42609 :: GetItemViewCoord() takes exactly 2 arguments (3 given) 0325 22:44:42609 :: 0325 22:44:42691 :: Traceback (most recent call last): 0325 22:44:42691 :: File "ui.py", line 1211, in OnIMEOpenCandidateList 0325 22:44:42691 :: File "uiCandidate.py", line 88, in Refresh 0325 22:44:42691 :: File "uiCandidate.py", line 79, in Append 0325 22:44:42691 :: File "ui.py", line 764, in AppendItem 0325 22:44:42691 :: File "ui.py", line 506, in AppendItem 0325 22:44:42691 :: TypeError 0325 22:44:42691 :: : 0325 22:44:42691 :: GetItemViewCoord() takes exactly 2 arguments (3 given) 0325 22:44:42691 :: 0325 22:44:43059 :: Traceback (most recent call last): 0325 22:44:43059 :: File "ui.py", line 1211, in OnIMEOpenCandidateList 0325 22:44:43059 :: File "uiCandidate.py", line 88, in Refresh 0325 22:44:43059 :: File "uiCandidate.py", line 79, in Append 0325 22:44:43059 :: File "ui.py", line 764, in AppendItem 0325 22:44:43059 :: File "ui.py", line 506, in AppendItem 0325 22:44:43059 :: TypeError 0325 22:44:43060 :: : 0325 22:44:43060 :: GetItemViewCoord() takes exactly 2 arguments (3 given) 0325 22:44:43060 :: 0325 22:44:43061 :: Traceback (most recent call last): 0325 22:44:43061 :: File "ui.py", line 1211, in OnIMEOpenCandidateList 0325 22:44:43061 :: File "uiCandidate.py", line 88, in Refresh 0325 22:44:43061 :: File "uiCandidate.py", line 79, in Append 0325 22:44:43062 :: File "ui.py", line 764, in AppendItem 0325 22:44:43062 :: File "ui.py", line 506, in AppendItem 0325 22:44:43062 :: TypeError 0325 22:44:43062 :: : 0325 22:44:43062 :: GetItemViewCoord() takes exactly 2 arguments (3 given) 0325 22:44:43062 :: 0325 22:44:43063 :: Traceback (most recent call last): 0325 22:44:43063 :: File "ui.py", line 1211, in OnIMEOpenCandidateList 0325 22:44:43063 :: File "uiCandidate.py", line 88, in Refresh 0325 22:44:43064 :: File "uiCandidate.py", line 79, in Append 0325 22:44:43064 :: File "ui.py", line 764, in AppendItem 0325 22:44:43064 :: File "ui.py", line 506, in AppendItem 0325 22:44:43064 :: TypeError 0325 22:44:43064 :: : 0325 22:44:43064 :: GetItemViewCoord() takes exactly 2 arguments (3 given) 0325 22:44:43064 :: 0325 22:44:43173 :: Traceback (most recent call last): 0325 22:44:43173 :: File "ui.py", line 1211, in OnIMEOpenCandidateList 0325 22:44:43173 :: File "uiCandidate.py", line 88, in Refresh 0325 22:44:43173 :: File "uiCandidate.py", line 79, in Append 0325 22:44:43173 :: File "ui.py", line 764, in AppendItem 0325 22:44:43173 :: File "ui.py", line 506, in AppendItem 0325 22:44:43173 :: TypeError 0325 22:44:43173 :: : 0325 22:44:43173 :: GetItemViewCoord() takes exactly 2 arguments (3 given) 0325 22:44:43173 :: 0325 22:44:43615 :: Traceback (most recent call last): 0325 22:44:43615 :: File "ui.py", line 1211, in OnIMEOpenCandidateList 0325 22:44:43615 :: File "uiCandidate.py", line 88, in Refresh 0325 22:44:43615 :: File "uiCandidate.py", line 79, in Append 0325 22:44:43615 :: File "ui.py", line 764, in AppendItem 0325 22:44:43615 :: File "ui.py", line 506, in AppendItem 0325 22:44:43615 :: TypeError 0325 22:44:43615 :: : 0325 22:44:43615 :: GetItemViewCoord() takes exactly 2 arguments (3 given) 0325 22:44:43615 :: 0325 22:44:43729 :: Traceback (most recent call last): 0325 22:44:43729 :: File "ui.py", line 1211, in OnIMEOpenCandidateList 0325 22:44:43729 :: File "uiCandidate.py", line 88, in Refresh 0325 22:44:43730 :: File "uiCandidate.py", line 79, in Append 0325 22:44:43730 :: File "ui.py", line 764, in AppendItem 0325 22:44:43730 :: File "ui.py", line 506, in AppendItem 0325 22:44:43730 :: TypeError 0325 22:44:43730 :: : 0325 22:44:43730 :: GetItemViewCoord() takes exactly 2 arguments (3 given) 0325 22:44:43730 :: 0325 22:44:43845 :: Traceback (most recent call last): 0325 22:44:43845 :: File "ui.py", line 1211, in OnIMEOpenCandidateList 0325 22:44:43845 :: File "uiCandidate.py", line 88, in Refresh 0325 22:44:43845 :: File "uiCandidate.py", line 79, in Append 0325 22:44:43846 :: File "ui.py", line 764, in AppendItem 0325 22:44:43846 :: File "ui.py", line 506, in AppendItem 0325 22:44:43846 :: TypeError 0325 22:44:43846 :: : 0325 22:44:43846 :: GetItemViewCoord() takes exactly 2 arguments (3 given) 0325 22:44:43846 :: 0325 22:44:45978 :: CItemManager::LoadItemList(locale/cibn10/item_list.txt) - StrangeLine in 9194 0325 22:44:45978 :: CItemManager::LoadItemList(locale/cibn10/item_list.txt) - StrangeLine in 9195 0325 22:51:04578 :: CItemManager::LoadItemList(locale/cibn10/item_list.txt) - StrangeLine in 9194 0325 22:51:04579 :: CItemManager::LoadItemList(locale/cibn10/item_list.txt) - StrangeLine in 9195 0325 22:51:10849 :: CItemManager::LoadItemList(locale/cibn10/item_list.txt) - StrangeLine in 9194 0325 22:51:10849 :: CItemManager::LoadItemList(locale/cibn10/item_list.txt) - StrangeLine in 9195 0325 22:53:45040 :: CItemManager::LoadItemList(locale/cibn10/item_list.txt) - StrangeLine in 9194 0325 22:53:45040 :: CItemManager::LoadItemList(locale/cibn10/item_list.txt) - StrangeLine in 9195 0325 22:53:01668 :: uiCharacter:1024: RuntimeWarning: tp_compare didn't return -1 or -2 for exception 0325 22:53:01670 :: game.py(line:265) Open game.py(line:716) StartGame game.py(line:868) RefreshCharacter interfaceModule.py(line:742) RefreshCharacter uiCharacter.py(line:1307) RefreshCharacter uiCharacter.py(line:1369) __SelectSkillGroup uiCharacter.py(line:1355) __SetSkillSlotData uiCharacter.py(line:1048) RefreshSkill uiCharacter.py(line:1024) __RefreshSkillPage GameWindow.Open - <type 'exceptions.RuntimeError'>:skill.GetSkillType - Failed to find skill by 170 0325 22:53:01670 :: ============================================================================================================ 0325 22:53:01670 :: Abort!!!!
-
@Heathcliff™ It will working good!
As you said, there are some NPCs that pass through, and some NPCs can't pass through, but this is fine, because the players can't pass through, this is the best!
Thank you for your answer
Best wishes to you!- 1
-
@Heathcliff™ Thank you for answering!
ActorInstanceCollisionDetection.cpp
Spoiler#include "StdAfx.h"#include "../eterLib/GrpMath.h"#include "../UserInterface/PythonBackground.h"#include "../UserInterface/Locale_inc.h"#include "ActorInstance.h"void CActorInstance::__InitializeCollisionData(){m_canSkipCollision=false;}void CActorInstance::EnableSkipCollision(){m_canSkipCollision=true;}void CActorInstance::DisableSkipCollision(){m_canSkipCollision=false;}bool CActorInstance::CanSkipCollision(){return m_canSkipCollision;}void CActorInstance::UpdatePointInstance(){TCollisionPointInstanceListIterator itor;for (itor = m_DefendingPointInstanceList.begin(); itor != m_DefendingPointInstanceList.end(); ++itor)UpdatePointInstance(&(*itor));}void CActorInstance::UpdatePointInstance(TCollisionPointInstance * pPointInstance){if (!pPointInstance){assert(!"CActorInstance::UpdatePointInstance - pPointInstance is NULL"); // 饭欺繁胶肺 背眉窍矫坷return;}D3DXMATRIX matBone;if (pPointInstance->isAttached){if (pPointInstance->dwModelIndex>=m_LODControllerVector.size()){//Tracenf("CActorInstance::UpdatePointInstance - rInstance.dwModelIndex=%d >= m_LODControllerVector.size()=%d",// pPointInstance->dwModelIndex>m_LODControllerVector.size());return;}CGrannyLODController* pGrnLODController=m_LODControllerVector[pPointInstance->dwModelIndex];if (!pGrnLODController){//Tracenf("CActorInstance::UpdatePointInstance - m_LODControllerVector[pPointInstance->dwModelIndex=%d] is NULL", pPointInstance->dwModelIndex);return;}CGrannyModelInstance * pModelInstance = pGrnLODController->GetModelInstance();if (!pModelInstance){//Tracenf("CActorInstance::UpdatePointInstance - pGrnLODController->GetModelInstance() is NULL");return;}D3DXMATRIX * pmatBone = (D3DXMATRIX *)pModelInstance->GetBoneMatrixPointer(pPointInstance->dwBoneIndex);matBone = *(D3DXMATRIX *)pModelInstance->GetCompositeBoneMatrixPointer(pPointInstance->dwBoneIndex);matBone._41 = pmatBone->_41;matBone._42 = pmatBone->_42;matBone._43 = pmatBone->_43;matBone *= m_worldMatrix;}else{matBone = m_worldMatrix;}// Update Collsion SphereCSphereCollisionInstanceVector::const_iterator sit = pPointInstance->c_pCollisionData->SphereDataVector.begin();CDynamicSphereInstanceVector::iterator dit=pPointInstance->SphereInstanceVector.begin();for (;sit!=pPointInstance->c_pCollisionData->SphereDataVector.end();++sit,++dit){const TSphereData & c = sit->GetAttribute();//c_pCollisionData->SphereDataVector[j].GetAttribute();D3DXMATRIX matPoint;D3DXMatrixTranslation(&matPoint, c.v3Position.x, c.v3Position.y, c.v3Position.z);matPoint = matPoint * matBone;dit->v3LastPosition = dit->v3Position;dit->v3Position.x = matPoint._41;dit->v3Position.y = matPoint._42;dit->v3Position.z = matPoint._43;}}void CActorInstance::UpdateAdvancingPointInstance(){// 富阑 爬阑 版快 荤恩篮 捞悼蔼阑 啊瘤绊 乐瘤 臼扁 锭巩俊 富肺 何磐 掘绢客具 茄促 - [levites]D3DXVECTOR3 v3Movement = m_v3Movement;if (m_pkHorse)v3Movement = m_pkHorse->m_v3Movement;// 富篮 诀单捞飘 窍瘤 臼酒档 等促 - [levites]if (m_pkHorse)m_pkHorse->UpdateAdvancingPointInstance();D3DXMATRIX matPoint;D3DXMATRIX matCenter;TCollisionPointInstanceListIterator itor = m_BodyPointInstanceList.begin();for (; itor != m_BodyPointInstanceList.end(); ++itor){TCollisionPointInstance & rInstance = *itor;if (rInstance.isAttached){if (rInstance.dwModelIndex>=m_LODControllerVector.size()){Tracenf("CActorInstance::UpdateAdvancingPointInstance - rInstance.dwModelIndex=%d >= m_LODControllerVector.size()=%d",rInstance.dwModelIndex, m_LODControllerVector.size());continue;}CGrannyLODController* pGrnLODController=m_LODControllerVector[rInstance.dwModelIndex];if (!pGrnLODController){Tracenf("CActorInstance::UpdateAdvancingPointInstance - m_LODControllerVector[rInstance.dwModelIndex=%d] is NULL", rInstance.dwModelIndex);continue;}CGrannyModelInstance * pModelInstance = pGrnLODController->GetModelInstance();if (!pModelInstance){//Tracenf("CActorInstance::UpdateAdvancingPointInstance - pGrnLODController->GetModelInstance() is NULL");continue;}matCenter = *(D3DXMATRIX *)pModelInstance->GetBoneMatrixPointer(rInstance.dwBoneIndex);matCenter *= m_worldMatrix;}else{matCenter = m_worldMatrix;}// Update Collision Sphereconst NRaceData::TCollisionData * c_pCollisionData = rInstance.c_pCollisionData;if (c_pCollisionData){for (DWORD j = 0; j < c_pCollisionData->SphereDataVector.size(); ++j){const TSphereData & c = c_pCollisionData->SphereDataVector[j].GetAttribute();CDynamicSphereInstance & rSphereInstance = rInstance.SphereInstanceVector[j];D3DXMatrixTranslation(&matPoint, c.v3Position.x, c.v3Position.y, c.v3Position.z);matPoint = matPoint * matCenter;rSphereInstance.v3LastPosition.x = matPoint._41;rSphereInstance.v3LastPosition.y = matPoint._42;rSphereInstance.v3LastPosition.z = matPoint._43;rSphereInstance.v3Position = rSphereInstance.v3LastPosition;rSphereInstance.v3Position += v3Movement;}}}}bool CActorInstance::CheckCollisionDetection(const CDynamicSphereInstanceVector * c_pAttackingSphereVector, D3DXVECTOR3 * pv3Position){if (!c_pAttackingSphereVector){assert(!"CActorInstance::CheckCollisionDetection - c_pAttackingSphereVector is NULL"); // 饭欺繁胶肺 背眉窍矫坷return false;}TCollisionPointInstanceListIterator itor;for (itor = m_DefendingPointInstanceList.begin(); itor != m_DefendingPointInstanceList.end(); ++itor){const CDynamicSphereInstanceVector * c_pDefendingSphereVector = &(*itor).SphereInstanceVector;for (DWORD i = 0; i < c_pAttackingSphereVector->size(); ++i)for (DWORD j = 0; j < c_pDefendingSphereVector->size(); ++j){const CDynamicSphereInstance & c_rAttackingSphere = c_pAttackingSphereVector->at(i);const CDynamicSphereInstance & c_rDefendingSphere = c_pDefendingSphereVector->at(j);if (DetectCollisionDynamicSphereVSDynamicSphere(c_rAttackingSphere, c_rDefendingSphere)){// FIXME : 滴 盔狼 背痢阑 茫酒郴绰 侥栏肺 官层具 茄促.*pv3Position = (c_rAttackingSphere.v3Position + c_rDefendingSphere.v3Position) / 2.0f;return true;}}}return false;}bool CActorInstance::CreateCollisionInstancePiece(DWORD dwAttachingModelIndex, const NRaceData::TAttachingData * c_pAttachingData, TCollisionPointInstance * pPointInstance){if (!c_pAttachingData){assert(!"CActorInstance::CreateCollisionInstancePiece - c_pAttachingData is NULL"); // 饭欺繁胶肺 背眉窍矫坷return false;}if (!c_pAttachingData->pCollisionData){assert(!"CActorInstance::CreateCollisionInstancePiece - c_pAttachingData->pCollisionData is NULL"); // 饭欺繁胶肺 背眉窍矫坷return false;}if (!pPointInstance){assert(!"CActorInstance::CreateCollisionInstancePiece - pPointInstance is NULL"); // 饭欺繁胶肺 背眉窍矫坷return false;}pPointInstance->dwModelIndex = dwAttachingModelIndex;pPointInstance->isAttached = FALSE;pPointInstance->dwBoneIndex = 0;pPointInstance->c_pCollisionData = c_pAttachingData->pCollisionData;if (c_pAttachingData->isAttaching){int iAttachingBoneIndex;CGrannyModelInstance * pModelInstance = m_LODControllerVector[dwAttachingModelIndex]->GetModelInstance();if (pModelInstance && pModelInstance->GetBoneIndexByName(c_pAttachingData->strAttachingBoneName.c_str(),&iAttachingBoneIndex)){pPointInstance->isAttached = TRUE;pPointInstance->dwBoneIndex = iAttachingBoneIndex;}else{//TraceError("CActorInstance::CreateCollisionInstancePiece: Cannot get matrix of bone %s ModelInstance 0x%p", c_pAttachingData->strAttachingBoneName.c_str(), pModelInstance);pPointInstance->isAttached = TRUE;pPointInstance->dwBoneIndex = 0;}}const CSphereCollisionInstanceVector & c_rSphereDataVector = c_pAttachingData->pCollisionData->SphereDataVector;pPointInstance->SphereInstanceVector.clear();pPointInstance->SphereInstanceVector.reserve(c_rSphereDataVector.size());CSphereCollisionInstanceVector::const_iterator it;CDynamicSphereInstance dsi;dsi.v3LastPosition = D3DXVECTOR3(0.0f,0.0f,0.0f);dsi.v3Position = D3DXVECTOR3(0.0f,0.0f,0.0f);for (it = c_rSphereDataVector.begin(); it!=c_rSphereDataVector.end(); ++it){const TSphereData & c_rSphereData = it->GetAttribute();dsi.fRadius = c_rSphereData.fRadius;pPointInstance->SphereInstanceVector.push_back(dsi);}return true;}///////////////////////////////////////////////////////////////////////////////////////////////////BOOL CActorInstance::__SplashAttackProcess(CActorInstance & rVictim){D3DXVECTOR3 v3Distance(rVictim.m_x - m_x, rVictim.m_z - m_z, rVictim.m_z - m_z);float fDistance = D3DXVec3LengthSq(&v3Distance);if (fDistance >= 1000.0f*1000.0f)return FALSE;// Check Distanceif (!__IsInSplashTime())return FALSE;const CRaceMotionData::TMotionAttackingEventData * c_pAttackingEvent = m_kSplashArea.c_pAttackingEvent;const NRaceData::TAttackData & c_rAttackData = c_pAttackingEvent->AttackData;THittedInstanceMap & rHittedInstanceMap = m_kSplashArea.HittedInstanceMap;// NOTE : 捞固 锭啡促搁 锭副 荐 绝澜if (rHittedInstanceMap.end() != rHittedInstanceMap.find(&rVictim)){return FALSE;}// NOTE : Snipe 葛靛捞绊..if (NRaceData::ATTACK_TYPE_SNIPE == c_rAttackData.iAttackType){// Target 捞 PC 扼搁..if (__IsFlyTargetPC())// 促弗 按眉绰 锭副 荐 绝促if (!__IsSameFlyTarget(&rVictim))return FALSE;/*if (IsFlyTargetObject()){CActorInstance * pActorInstance = (CActorInstance *)m_kFlyTarget.GetFlyTarget();// NOTE : Target 捞 PC 老锭绰 茄疙父 锭副 荐 乐促.if (pActorInstance->IsPC())if (&rVictim != pActorInstance)return FALSE;}*/}D3DXVECTOR3 v3HitPosition;if (rVictim.CheckCollisionDetection(&m_kSplashArea.SphereInstanceVector, &v3HitPosition)){rHittedInstanceMap.insert(make_pair(&rVictim, GetLocalTime()+c_rAttackData.fInvisibleTime));int iCurrentHitCount = rHittedInstanceMap.size();int iMaxHitCount = (0 == c_rAttackData.iHitLimitCount ? 16 : c_rAttackData.iHitLimitCount);//Tracef(" ------------------- Splash Hit : %d\n", iCurrentHitCount);if (iCurrentHitCount > iMaxHitCount){//Tracef(" ------------------- OVER FLOW :: Splash Hit Count : %d\n", iCurrentHitCount);return FALSE;}NEW_SetAtkPixelPosition(NEW_GetCurPixelPositionRef());__ProcessDataAttackSuccess(c_rAttackData, rVictim, v3HitPosition, m_kSplashArea.uSkill, m_kSplashArea.isEnableHitProcess);return TRUE;}return FALSE;}BOOL CActorInstance::__NormalAttackProcess(CActorInstance & rVictim){// Check Distance// NOTE - 老窜 辟立 眉农父 窍绊 乐澜D3DXVECTOR3 v3Distance(rVictim.m_x - m_x, rVictim.m_z - m_z, rVictim.m_z - m_z);float fDistance = D3DXVec3LengthSq(&v3Distance);extern bool IS_HUGE_RACE(unsigned int vnum);if (IS_HUGE_RACE(rVictim.GetRace())){if (fDistance >= 500.0f*500.0f)return FALSE;}else{if (fDistance >= 300.0f*300.0f)return FALSE;}if (!isValidAttacking())return FALSE;const float c_fAttackRadius = 20.0f;const NRaceData::TMotionAttackData * pad = m_pkCurRaceMotionData->GetMotionAttackDataPointer();const float motiontime = GetAttackingElapsedTime();NRaceData::THitDataContainer::const_iterator itorHitData = pad->HitDataContainer.begin();for (; itorHitData != pad->HitDataContainer.end(); ++itorHitData){const NRaceData::THitData & c_rHitData = *itorHitData;// NOTE : 捞固 嘎疽绰瘤 眉农THitDataMap::iterator itHitData = m_HitDataMap.find(&c_rHitData);if (itHitData != m_HitDataMap.end()){THittedInstanceMap & rHittedInstanceMap = itHitData->second;THittedInstanceMap::iterator itInstance;if ((itInstance=rHittedInstanceMap.find(&rVictim)) != rHittedInstanceMap.end()){if (pad->iMotionType==NRaceData::MOTION_TYPE_COMBO || itInstance->second > GetLocalTime())continue;}}NRaceData::THitTimePositionMap::const_iterator range_start, range_end;range_start = c_rHitData.mapHitPosition.lower_bound(motiontime-CTimer::Instance().GetElapsedSecond());range_end = c_rHitData.mapHitPosition.upper_bound(motiontime);float c = cosf(D3DXToRadian(GetRotation()));float s = sinf(D3DXToRadian(GetRotation()));for(;range_start!=range_end;++range_start){const CDynamicSphereInstance& dsiSrc=range_start->second;CDynamicSphereInstance dsi;dsi = dsiSrc;dsi.fRadius = c_fAttackRadius;{D3DXVECTOR3 v3SrcDir=dsiSrc.v3Position-dsiSrc.v3LastPosition;v3SrcDir*=__GetReachScale();const D3DXVECTOR3& v3Src = dsiSrc.v3LastPosition+v3SrcDir;D3DXVECTOR3& v3Dst = dsi.v3Position;v3Dst.x = v3Src.x * c - v3Src.y * s;v3Dst.y = v3Src.x * s + v3Src.y * c;v3Dst += GetPosition();}{const D3DXVECTOR3& v3Src = dsiSrc.v3LastPosition;D3DXVECTOR3& v3Dst = dsi.v3LastPosition;v3Dst.x = v3Src.x * c - v3Src.y * s;v3Dst.y = v3Src.x * s + v3Src.y * c;v3Dst += GetPosition();}TCollisionPointInstanceList::iterator cpit;for(cpit = rVictim.m_DefendingPointInstanceList.begin(); cpit!=rVictim.m_DefendingPointInstanceList.end();++cpit){int index = 0;const CDynamicSphereInstanceVector & c_DefendingSphereVector = cpit->SphereInstanceVector;CDynamicSphereInstanceVector::const_iterator dsit;for(dsit = c_DefendingSphereVector.begin(); dsit!= c_DefendingSphereVector.end();++dsit, ++index){const CDynamicSphereInstance& sub = *dsit;if (DetectCollisionDynamicZCylinderVSDynamicZCylinder(dsi, sub)){THitDataMap::iterator itHitData = m_HitDataMap.find(&c_rHitData);if (itHitData == m_HitDataMap.end()){THittedInstanceMap HittedInstanceMap;HittedInstanceMap.insert(make_pair(&rVictim, GetLocalTime()+pad->fInvisibleTime));//HittedInstanceMap.insert(make_pair(&rVictim, GetLocalTime()+HIT_COOL_TIME));m_HitDataMap.insert(make_pair(&c_rHitData, HittedInstanceMap));//Tracef(" ----------- First Hit\n");}else{itHitData->second.insert(make_pair(&rVictim, GetLocalTime()+pad->fInvisibleTime));//itHitData->second.insert(make_pair(&rVictim, GetLocalTime()+HIT_COOL_TIME));//Tracef(" ----------- Next Hit : %d\n", itHitData->second.size());int iCurrentHitCount = itHitData->second.size();// NOTE : 焊烹 傍拜篮 16疙捞 茄拌if (NRaceData::MOTION_TYPE_COMBO == pad->iMotionType || NRaceData::MOTION_TYPE_NORMAL == pad->iMotionType){if (iCurrentHitCount > 16){//Tracef(" Type NORMAL :: Overflow - Can't process, skip\n");return FALSE;}}else{if (iCurrentHitCount > pad->iHitLimitCount){//Tracef(" Type SKILL :: Overflow - Can't process, skip\n");return FALSE;}}}D3DXVECTOR3 v3HitPosition = (GetPosition() + rVictim.GetPosition()) *0.5f;// #0000780: [M2KR] 荐锋 鸥拜备 巩力extern bool IS_HUGE_RACE(unsigned int vnum);if (IS_HUGE_RACE(rVictim.GetRace())){v3HitPosition = (GetPosition() + sub.v3Position) * 0.5f;}__ProcessDataAttackSuccess(*pad, rVictim, v3HitPosition, m_kCurMotNode.uSkill);return TRUE;}}}}}return FALSE;}BOOL CActorInstance::AttackingProcess(CActorInstance & rVictim){if (rVictim.__isInvisible())return FALSE;if (__SplashAttackProcess(rVictim))return TRUE;if (__NormalAttackProcess(rVictim))return TRUE;return FALSE;}BOOL CActorInstance::TestPhysicsBlendingCollision(CActorInstance & rVictim){if (rVictim.IsDead())return FALSE;TPixelPosition kPPosLast;GetBlendingPosition( &kPPosLast );D3DXVECTOR3 v3Distance = D3DXVECTOR3(rVictim.m_x - kPPosLast.x, rVictim.m_y - kPPosLast.y, rVictim.m_z - kPPosLast.z);float fDistance = D3DXVec3LengthSq(&v3Distance);if (fDistance > 800.0f*800.0f)return FALSE;// NOTE : 傍拜 吝老锭绰 Defending Sphere肺 Collision Check甫 钦聪促.// NOTE : Wait肺 喉坊爹 登绰 档吝俊 墩绊 甸绢啊绰 巩力啊 乐绢辑.. - [levites]TCollisionPointInstanceList * pMainList;TCollisionPointInstanceList * pVictimList;if (isAttacking() || IsWaiting()){pMainList = &m_DefendingPointInstanceList;pVictimList = &rVictim.m_DefendingPointInstanceList;}else{pMainList = &m_BodyPointInstanceList;pVictimList = &rVictim.m_BodyPointInstanceList;}TPixelPosition kPDelta;m_PhysicsObject.GetLastPosition(&kPDelta);D3DXVECTOR3 prevLastPosition, prevPosition;const int nSubCheckCount = 50;TCollisionPointInstanceListIterator itorMain = pMainList->begin();TCollisionPointInstanceListIterator itorVictim = pVictimList->begin();for (; itorMain != pMainList->end(); ++itorMain){for (; itorVictim != pVictimList->end(); ++itorVictim){CDynamicSphereInstanceVector & c_rMainSphereVector = (*itorMain).SphereInstanceVector;CDynamicSphereInstanceVector & c_rVictimSphereVector = (*itorVictim).SphereInstanceVector;for (DWORD i = 0; i < c_rMainSphereVector.size(); ++i){CDynamicSphereInstance & c_rMainSphere = c_rMainSphereVector;//adjust main sphere centerprevLastPosition = c_rMainSphere.v3LastPosition;prevPosition = c_rMainSphere.v3Position;c_rMainSphere.v3LastPosition = prevPosition;for( int i = 1; i <= nSubCheckCount; ++ i ){c_rMainSphere.v3Position = prevPosition + (float)(i/(float)nSubCheckCount) * kPDelta;for (DWORD j = 0; j < c_rVictimSphereVector.size(); ++j){CDynamicSphereInstance & c_rVictimSphere = c_rVictimSphereVector[j];if (DetectCollisionDynamicSphereVSDynamicSphere(c_rMainSphere, c_rVictimSphere)){BOOL bResult = GetVector3Distance(c_rMainSphere.v3Position, c_rVictimSphere.v3Position) <= GetVector3Distance(c_rMainSphere.v3LastPosition, c_rVictimSphere.v3Position);c_rMainSphere.v3LastPosition = prevLastPosition;c_rMainSphere.v3Position = prevPosition;return bResult;}}}//restorec_rMainSphere.v3LastPosition = prevLastPosition;c_rMainSphere.v3Position = prevPosition;}}}return FALSE;}#define ENABLE_PETS_WITHOUT_COLLISIONS#define ENABLE_SHOPS_WITHOUT_COLLISIONS#define ENABLE_MOUNTS_WITHOUT_COLLISIONSBOOL CActorInstance::TestActorCollision(CActorInstance & rVictim){if (rVictim.IsDead())return FALSE;#ifdef ENABLE_PETS_WITHOUT_COLLISIONSif (rVictim.GetRace()>=34001 && rVictim.GetRace()<=34099)return FALSE;#endif#ifdef ENABLE_SHOPS_WITHOUT_COLLISIONSif (rVictim.GetRace()>=30000 && rVictim.GetRace()<=30001)return FALSE;#endif#ifdef ENABLE_MOUNTS_WITHOUT_COLLISIONSif (rVictim.GetRace()>=20101 && rVictim.GetRace()<=20299)return FALSE;#endif#ifdef ENABLE_COLISION_WOL2int pListGlobal[] = {20300, 20301, 20302, 20303, 20304, 20305, 20306, 20307, 9001, 9002, 9003, 9005, 9006, 20091, 30121, 20015, 20094, 20406, 20349, 20011,20018, 20009, 11000, 11001, 20355, 20354, 20358, 20357, 20084, 20086, 20087};const char* strMapListGlobal[] = {"metin2_map_a1", "metin2_map_a3", "metin2_map_b1", "metin2_map_b3", "metin2_map_c1", "metin2_map_c3"};std::string stringName = CPythonBackground::Instance().GetWarpMapName();for (int i = 0; i < _countof(strMapListGlobal); i++){if (strMapListGlobal == stringName){for (int i = 0; i < _countof(pListGlobal); i++){if (rVictim.GetRace() == pListGlobal || 0 <= rVictim.GetRace() && rVictim.GetRace() <= 7 )return FALSE;}}}#endifD3DXVECTOR3 v3Distance = D3DXVECTOR3(rVictim.m_x - m_x, rVictim.m_y - m_y, rVictim.m_z - m_z);float fDistance = D3DXVec3LengthSq(&v3Distance);if (fDistance > 800.0f*800.0f)return FALSE;TCollisionPointInstanceList * pMainList;TCollisionPointInstanceList * pVictimList;if (isAttacking() || IsWaiting()){pMainList = &m_DefendingPointInstanceList;pVictimList = &rVictim.m_DefendingPointInstanceList;}else{pMainList = &m_BodyPointInstanceList;pVictimList = &rVictim.m_BodyPointInstanceList;}TCollisionPointInstanceListIterator itorMain = pMainList->begin();TCollisionPointInstanceListIterator itorVictim = pVictimList->begin();for (; itorMain != pMainList->end(); ++itorMain)for (; itorVictim != pVictimList->end(); ++itorVictim){const CDynamicSphereInstanceVector & c_rMainSphereVector = (*itorMain).SphereInstanceVector;const CDynamicSphereInstanceVector & c_rVictimSphereVector = (*itorVictim).SphereInstanceVector;for (DWORD i = 0; i < c_rMainSphereVector.size(); ++i)for (DWORD j = 0; j < c_rVictimSphereVector.size(); ++j){const CDynamicSphereInstance & c_rMainSphere = c_rMainSphereVector;const CDynamicSphereInstance & c_rVictimSphere = c_rVictimSphereVector[j];if (DetectCollisionDynamicSphereVSDynamicSphere(c_rMainSphere, c_rVictimSphere)){if (GetVector3Distance(c_rMainSphere.v3Position, c_rVictimSphere.v3Position) <=GetVector3Distance(c_rMainSphere.v3LastPosition, c_rVictimSphere.v3Position)){return TRUE;}return FALSE;}}}return FALSE;}bool CActorInstance::AvoidObject(const CGraphicObjectInstance& c_rkBGObj){#ifdef __MOVIE_MODE__if (IsMovieMode())return false;#endifif (this==&c_rkBGObj)return false;if (!__TestObjectCollision(&c_rkBGObj))return false;__AdjustCollisionMovement(&c_rkBGObj);return true;}bool CActorInstance::IsBlockObject(const CGraphicObjectInstance& c_rkBGObj){if (this==&c_rkBGObj)return false;if (!__TestObjectCollision(&c_rkBGObj))return false;return true;}void CActorInstance::BlockMovement(){if (m_pkHorse){m_pkHorse->__InitializeMovement();return;}__InitializeMovement();}BOOL CActorInstance::__TestObjectCollision(const CGraphicObjectInstance * c_pObjectInstance){if (m_pkHorse){if (m_pkHorse->__TestObjectCollision(c_pObjectInstance))return TRUE;return FALSE;}if (m_canSkipCollision)return FALSE;if (m_v3Movement.x == 0.0f && m_v3Movement.y == 0.0f && m_v3Movement.z == 0.0f)return FALSE;TCollisionPointInstanceListIterator itorMain = m_BodyPointInstanceList.begin();for (; itorMain != m_BodyPointInstanceList.end(); ++itorMain){const CDynamicSphereInstanceVector & c_rMainSphereVector = (*itorMain).SphereInstanceVector;for (DWORD i = 0; i < c_rMainSphereVector.size(); ++i){const CDynamicSphereInstance & c_rMainSphere = c_rMainSphereVector;if (c_pObjectInstance->MovementCollisionDynamicSphere(c_rMainSphere)){//const D3DXVECTOR3 & c_rv3Position = c_pObjectInstance->GetPosition();//if (GetVector3Distance(c_rMainSphere.v3Position, c_rv3Position) <// GetVector3Distance(c_rMainSphere.v3LastPosition, c_rv3Position)){return TRUE;}//return FALSE;}}}return FALSE;}bool CActorInstance::TestCollisionWithDynamicSphere(const CDynamicSphereInstance & dsi){TCollisionPointInstanceListIterator itorMain = m_BodyPointInstanceList.begin();for (; itorMain != m_BodyPointInstanceList.end(); ++itorMain){const CDynamicSphereInstanceVector & c_rMainSphereVector = (*itorMain).SphereInstanceVector;for (DWORD i = 0; i < c_rMainSphereVector.size(); ++i){const CDynamicSphereInstance & c_rMainSphere = c_rMainSphereVector;if (DetectCollisionDynamicSphereVSDynamicSphere(c_rMainSphere, dsi)){return true;}}}return false;} -
-
@Heathcliff™,not only safezone,it happens anywhere XD··
-
Hi!Devs,
my client, Player through the body, like pictures, I don't want them to be traversed, unstoppable, this is an inexplicable mistake, where should I change it?
Thank you for your answer
The best wishes for you~
[HELP]penetrate mountains and rocks
in Community Support - Questions & Answers
Posted
thank you ,but I can't find it.;lol`````````