Raised This Month: $51 Target: $400
 12% 

Solved FM_ShouldCollide is never called.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-11-2023 , 20:09   FM_ShouldCollide is never called.
Reply With Quote #1

I want to disable collision for NPCs but engfunc ShouldCollide is never called even though i tried moving the NPCs using Engfunc_MoveToOrigin to call it from SV_movestep which calls SV_Move and SV_Move calls ClipToLink which calls ShouldCollide, but no luck at all.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 07-15-2023 at 18:54.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-14-2023 , 23:28   Re: FM_ShouldCollide is never called.
Reply With Quote #2

BUMp
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
JusTGo
Veteran Member
Join Date: Mar 2013
Old 07-15-2023 , 03:19   Re: FM_ShouldCollide is never called.
Reply With Quote #3

Is your NPC solid? If I remember correctly not all SOLID types gets called in pfnShouldCollide
__________________
JusTGo is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-15-2023 , 06:07   Re: FM_ShouldCollide is never called.
Reply With Quote #4

Quote:
Originally Posted by JusTGo View Post
Is your NPC solid? If I remember correctly not all SOLID types gets called in pfnShouldCollide
Yea its solid slidebox
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
JusTGo
Veteran Member
Join Date: Mar 2013
Old 07-15-2023 , 15:05   Re: FM_ShouldCollide is never called.
Reply With Quote #5

Quote:
Originally Posted by Natsheh View Post
Yea its solid slidebox
Are using ReHLDS? also show your code so we can reproduce it
__________________
JusTGo is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-15-2023 , 15:36   Re: FM_ShouldCollide is never called.
Reply With Quote #6

Quote:
Originally Posted by JusTGo View Post
Are using ReHLDS? also show your code so we can reproduce it
Yeah,

PHP Code:
public plugin_init()
register_forward(FM_ShouldCollide"pfnShouldCollide", ._post false);

public 
pfnShouldCollide(const touched, const passedict)
{
    
cprint_chat(0_"Colliding %d >< %d"touchedpassedict);

    if(
pev(touchedNPC_ID) == pev(passedictNPC_ID))
    {
        
//forward_return(FMV_CELL, 0);
    
}

This is never called, and yesi am using rehlds and regamedll
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-15-2023 , 18:54   Re: FM_ShouldCollide is never called.
Reply With Quote #7

Solved thanks to JustGo for revealing that if you disable/comment out the gamemod from liblist.gam the forward will work some how.

Btw if you want to hook FM_ShouldCollide you better do it outside plugin_init and delay the hooking so it doesn't increase map load time.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 07-15-2023 at 18:58.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 08-05-2023 , 21:21   Re: FM_ShouldCollide is never called.
Reply With Quote #8

Quote:
Originally Posted by Natsheh View Post
Solved thanks to JustGo for revealing that if you disable/comment out the gamemod from liblist.gam the forward will work some how.

Btw if you want to hook FM_ShouldCollide you better do it outside plugin_init and delay the hooking so it doesn't increase map load time.
sorry for reviving this again , disabling the gamemode will not cause any issue to server ? i wanna know
__________________
SED LYF !!!
SHIELD755 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-06-2023 , 00:15   Re: FM_ShouldCollide is never called.
Reply With Quote #9

Quote:
Originally Posted by SHIELD755 View Post
sorry for reviving this again , disabling the gamemode will not cause any issue to server ? i wanna know
As far as i know, no issues will be created
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:28.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode