Browse Source

small changes

shuvit 8 months ago
parent
commit
fd1ea1d532
1 changed files with 5 additions and 7 deletions
  1. 5
    7
      scripts/controller2.py

+ 5
- 7
scripts/controller2.py View File

@@ -907,13 +907,11 @@ def main():
907 907
             own["lastStop"] = True
908 908
         else:
909 909
             can_stop = 1
910
-        if onGround and STANCE == False and can_stop == 1:
911
-            own['requestAction'] = 'reg_stop'
912
-            yvel = linVelocity.x * .985
913
-            force = [(yvel), 0, linVelocity.z]
914
-            own.setLinearVelocity(force, True)
915
-        elif onGround and STANCE == True and can_stop == 1:
916
-            own['requestAction'] = 'fak_stop'
910
+        if can_stop == 1:
911
+            if onGround and STANCE == False:
912
+                own['requestAction'] = 'reg_stop'
913
+            elif onGround and STANCE == True:
914
+                own['requestAction'] = 'fak_stop'
917 915
             yvel = linVelocity.x * .985
918 916
             force = [(yvel), 0, linVelocity.z]
919 917
             own.setLinearVelocity(force, True)

Loading…
Cancel
Save