[x] I have tried my absolute best to reduce the problem-space and have provided the absolute smallest test-case possible.
[x] I can always reproduce the issue with the provided description below.
Environment
Operating System version: Ubuntu 20.04
Game/AppID (with version if applicable): Counter-Strike
Current AMX Mod X version: 1.10.0 - 5462
Current Metamod version: v1.21.1-am (all OSes)
[x] I have updated AMX Mod X to the latest version and it still happens.
[x] I have updated AMX Mod X to the latest snapshot and it still happens.
[x] I have updated Metamod to the latest version and it still happens.
Description
Forward "FM_ShouldCollide" can't detect go through between player and entity like entity's classname is "func_door", player can stand on the entity, here are the module https://forums.alliedmods.net/showthread.php?t=261852 fixed this bug, I hope amxx can fix the "FM_ShouldCollide"'s bug.
Thank you.
Problematic Code (or Steps to Reproduce)
public plugin_init()
{
register_forward(FM_ShouldCollide, "ShouldCollide")
//Just for client-side prediction
register_forward(FM_AddToFullPack,"fw_AddToFullPack_Post",1)
}
public ShouldCollide(playerindex, entindex)
{
new ret;
if(!is_user_alive(entindex) || playerindex == entindex)
ret = 1;
else if(get_user_team(playerindex) == get_user_team(entindex))
ret = 0;
else
ret = 1;
forward_return(FMV_CELL, ret);
return FMRES_SUPERCEDE;
}
Help us help you
Environment
Description
Forward "FM_ShouldCollide" can't detect go through between player and entity like entity's classname is "func_door", player can stand on the entity, here are the module https://forums.alliedmods.net/showthread.php?t=261852 fixed this bug, I hope amxx can fix the "FM_ShouldCollide"'s bug. Thank you.
Problematic Code (or Steps to Reproduce)
public plugin_init() { register_forward(FM_ShouldCollide, "ShouldCollide") //Just for client-side prediction register_forward(FM_AddToFullPack,"fw_AddToFullPack_Post",1) }
public ShouldCollide(playerindex, entindex) { new ret; if(!is_user_alive(entindex) || playerindex == entindex) ret = 1; else if(get_user_team(playerindex) == get_user_team(entindex)) ret = 0; else ret = 1; forward_return(FMV_CELL, ret); return FMRES_SUPERCEDE; }
public AddToFullPack_Post(es_handle,e,ent,host,hostflags,player,pSet) { if(ShouldCollide(host, ent) == 0) { set_es(es_handle, ES_Solid, SOLID_NOT); } return FMRES_HANDLED; }
Logs