Jump to content

Recommended Posts

M2 Download Center

This is the hidden content, please
( Internal )

Today i release a code which you can walk through safezone without block

 

Client Source:

 

GameLib

ActorInstance.h

// Search for:
		BOOL TestPhysicsBlendingCollision(CActorInstance & rVictim);

// Add under:
// #ifdef ENABLE_SAFEZONE_STOP_COLLISION
		BOOL IsInSafe(CActorInstance & ptr);
// #endif

 

ActorInstanceCollisionDetection.cpp

// Search for:
BOOL CActorInstance::TestActorCollision(CActorInstance & rVictim)

// Add before:
// #ifdef ENABLE_SAFEZONE_STOP_COLLISION
#include "../UserInterface/PythonBackground.h"

BOOL CActorInstance::IsInSafe(CActorInstance & ptr)
{
	const TPixelPosition& c_rkPPosCur = ptr.NEW_GetCurPixelPositionRef();
	if (CPythonBackground::Instance().isAttrOn(c_rkPPosCur.x, c_rkPPosCur.y, (1 << 2)))
		return true;

	return false;
}
// #endif

// On CActorInstance::TestActorCollision
// Search for:
	if (rVictim.IsDead())
		return false;

// Add under:
// #ifdef ENABLE_SAFEZONE_STOP_COLLISION
	if (IsInSafe(rVictim))
		return false;
// #endif

 

Enjoy.

 

 

  • Metin2 Dev 16
  • Good 2
  • Love 22
Link to comment
https://metin2.dev/topic/15246-walk-through-safezone-without-block/
Share on other sites

Thanks for release, but why you create a new bool for what? to look like more tutorial code? need only 3 lines.

	const TPixelPosition& c_rkPPosCur = NEW_GetCurPixelPositionRef();
	if (CPythonBackground::Instance().isAttrOn(c_rkPPosCur.x, c_rkPPosCur.y, CTerrainImpl::ATTRIBUTE_BANPK))
		return FALSE;

Also the check is already exist, just need to copy-paste check from:

bool CInstanceBase::IsInSafe() // InstanceBase.cpp

Original idea is from: Rubinum2.

PS: Here is nothing to coding, is just copy 3 lines from other part and put in this part. ", you just copy also them idea and + title name video from rubinum.  i will release a code of mine "

  • Metin2 Dev 1
On 3/14/2017 at 11:50 PM, Tasho said:

Thanks for release, but why you create a new bool for what? to look like more tutorial code? need only 3 lines.


	const TPixelPosition& c_rkPPosCur = NEW_GetCurPixelPositionRef();
	if (CPythonBackground::Instance().isAttrOn(c_rkPPosCur.x, c_rkPPosCur.y, CTerrainImpl::ATTRIBUTE_BANPK))
		return FALSE;

Also the check is already exist, just need to copy-paste check from:


bool CInstanceBase::IsInSafe() // InstanceBase.cpp

Original idea is from: Rubinum2.

  Reveal hidden contents

 

 

I create a new bool because in my source i use more code from that what i share here.

I had coded this before a long time ago and i share it now, the idea is not coming from Rubinum2 but they have released a video and show this idea to the community before me.

  • Love 1
19 minutes ago, Tasho said:

Thanks for release, but why you create a new bool for what? to look like more tutorial code? need only 3 lines.


	const TPixelPosition& c_rkPPosCur = NEW_GetCurPixelPositionRef();
	if (CPythonBackground::Instance().isAttrOn(c_rkPPosCur.x, c_rkPPosCur.y, CTerrainImpl::ATTRIBUTE_BANPK))
		return FALSE;

Also the check is already exist, just need to copy-paste check from:


bool CInstanceBase::IsInSafe() // InstanceBase.cpp

Original idea is from: Rubinum2.

PS: Here is nothing to coding, is just copy 3 lines from other part and put in this part. " i will release a code of mine "

 

 

Thanks, i will test.

 

https://metin2.download/picture/77BDf3N9AB8Rf6R97u2o2AA9xLKVefM9/.png

 

do i something wrong?, cause its not work.

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 2
7 minutes ago, daradevil124 said:

 

 

Thanks, i will test.

 

https://metin2.download/picture/77BDf3N9AB8Rf6R97u2o2AA9xLKVefM9/.png

 

do i something wrong?, cause its not work.

Download: 

This is the hidden content, please

download the file and follow the tutorial.

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 5
  • Good 3
  • Love 3
9 minutes ago, Legend said:

Download: 

This is the hidden content, please

download the file and follow the tutorial.

Nice work now.

 

https://metin2.download/picture/g3go6G8JQpVxe4Y3hGdphOM0NtuUHHpX/.jpg

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1
  • 8 months later...
La 14.03.2017 la 23:50, Tasho a spus:

Thanks for release, but why you create a new bool for what? to look like more tutorial code? need only 3 lines.


	const TPixelPosition& c_rkPPosCur = NEW_GetCurPixelPositionRef();
	if (CPythonBackground::Instance().isAttrOn(c_rkPPosCur.x, c_rkPPosCur.y, CTerrainImpl::ATTRIBUTE_BANPK))
		return FALSE;

Also the check is already exist, just need to copy-paste check from:


bool CInstanceBase::IsInSafe() // InstanceBase.cpp

Original idea is from: Rubinum2.

PS: Here is nothing to coding, is just copy 3 lines from other part and put in this part. ", you just copy also them idea and + title name video from rubinum.  i will release a code of mine "

Readability

  • 2 years later...
  • Forum Moderator
7 hours ago, DemOnJR said:

Invalid link!

@ Moderator

 

I updated the original topic with Legends Code directly (I had a backup on my storage).  I hope it works! 

 

Best regards
Raylee

Edited by Raylee
  • Love 3

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / 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.