summaryrefslogtreecommitdiffstats
path: root/System.c4g
diff options
context:
space:
mode:
authorMarkus Mittendrein <git@maxmitti.tk>2017-05-18 11:47:56 +0200
committerMarkus Mittendrein <git@maxmitti.tk>2017-05-18 11:47:56 +0200
commit19929a9bf3dcf209105962a4eec029f3b61cfb6e (patch)
treea24358f04abe6d5b34c19557d17e04152a9f8a00 /System.c4g
parent02eeba571ddf5ed6d7892c1f6ba5e161f02454b8 (diff)
downloadObjectsAppend-19929a9bf3dcf209105962a4eec029f3b61cfb6e.tar.gz
ObjectsAppend-19929a9bf3dcf209105962a4eec029f3b61cfb6e.zip
Avoid strange behaviour if calling the ControlDigDouble override multiple times (caused sometimes of including CLNK)
Diffstat (limited to 'System.c4g')
-rw-r--r--System.c4g/DTSelectionContext.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/System.c4g/DTSelectionContext.c b/System.c4g/DTSelectionContext.c
index 3584efa..1f4ebf0 100644
--- a/System.c4g/DTSelectionContext.c
+++ b/System.c4g/DTSelectionContext.c
@@ -379,9 +379,13 @@ func RemoveLineEntry(id id, int pos)
return true;
}
-func ControlDigDouble(target, overloaded)
+func ControlDigDouble()
{
- var ret = _inherited(target, true, ...);
+ static DT_SelectionContext_ControlDigDouble_overloaded;
+ var overloaded = DT_SelectionContext_ControlDigDouble_overloaded;
+ DT_SelectionContext_ControlDigDouble_overloaded = true;
+ var ret = _inherited(...);
+ DT_SelectionContext_ControlDigDouble_overloaded = overloaded;
if(!ret && !overloaded)
{
if(GetProcedure() == "WALK" || GetProcedure() == "DIG" || GetProcedure() == "SWIM")