You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Projectiles can collide with triggers (levers, switches). However, this behavior is not disabled for triggers that should not respond to objects. Projectiles collide with any trigger which causes a loud metallic noise and will cause the projectile to drop in some cases.
Fix this with this script.
Make sure triggers in the original gothic are initialized with the correctrespondToObjectflags.
/* ... */constint oCAIArrow__CanThisCollideWith = 6952080; //0x6A1490 // Hook length 7constint zCTrigger_vtbl = 8627196;
constint zCTriggerScript_vtbl = 8582148;
/* ... */// virtual int __thiscall oCAIArrow::CanThisCollideWith(class zCVob *)HookEngineF(oCAIArrow__CanThisCollideWith, 7, freeAimTriggerCollisionCheck);
/* ... */
func voidfreeAimTriggerCollisionCheck() {
var int vobPtr; vobPtr = ESP + 4;
var int shooter; shooter = MEM_ReadInt(ECX + 92);
var int vtbl; vtbl = MEM_ReadInt(MEM_ReadInt(vobPtr));
if(vtbl != zCTrigger_vtbl) && (vtbl != zCTriggerScript_vtbl) { return; }; // It is no Trigger
var zCTrigger trigger; trigger = _^(MEM_ReadInt(vobPtr));
if (trigger.bitfield & zCTrigger_bitfield_respondToObject) { return; }; // Object-reacting triggerMEM_WriteInt(vobPtr, shooter); // The engine ignores the shooter
};
Projectiles can collide with triggers (levers, switches). However, this behavior is not disabled for triggers that should not respond to objects. Projectiles collide with any trigger which causes a loud metallic noise and will cause the projectile to drop in some cases.
Fix this with this script.
Make sure triggers in the original gothic are initialized with the correct
respondToObject
flags.Source
The text was updated successfully, but these errors were encountered: