shithub: rott

Download patch

ref: 0e7a700ee20fb281ef6e8b41bae3375d044f78da
parent: 47f1202b435ae84d69a402bfbefc3d4596903f57
author: LTCHIPS <ltchips994@gmail.com>
date: Mon Mar 12 12:20:10 EDT 2018

restored old randomized weapons settings, with bat included

--- a/rott/rt_actor.c
+++ b/rott/rt_actor.c
@@ -1635,11 +1635,6 @@
     }
 
 #endif
-    else
-    {
-        ob->temp3 = stat_bazooka;
-        ob->temp2 = 3;
-    }
 }
 
 extern boolean allowBlitzMoreMissileWeps;
@@ -1648,8 +1643,8 @@
 void ConsiderOutfittingBlitzguard(objtype *ob)
 {
     //WILEYBLITZCHANCE is defined to be 20
-    if //((GameRandomNumber("wiley blitzguard",0) < WILEYBLITZCHANCE) &&
-        ((gamestate.difficulty >= gd_medium)
+    if ((GameRandomNumber("wiley blitzguard",0) < WILEYBLITZCHANCE) &&
+        (gamestate.difficulty >= gd_medium)
        )
     {
         if (allowBlitzMoreMissileWeps)
@@ -1658,13 +1653,13 @@
         }
         else 
         {
-            ob->temp3 = stat_bat;
+            ob->temp3 = stat_bazooka;
             ob->temp2 = 3;
         }
     }
 }
 
-void A_BatAttack(objtype*ob, objtype*target)
+void BlitzBatAttack(objtype*ob, objtype*target)
 {   
     objtype *temp,*temp2;
     //objtype *grenadetarget;
@@ -1691,7 +1686,7 @@
         return;
     
     SD_PlaySoundRTP(SD_EXCALISWINGSND,ob->x,ob->y);
-    magangle = abs(ob->angle - AngleBetween(ob,target));
+    //magangle = abs(ob->angle - AngleBetween(ob,target));
     //if (magangle > VANG180)
         //magangle = ANGLES - magangle;
 
@@ -12195,7 +12190,7 @@
         {
             //is the target close enough for me to hit with my bat?
             if ((abs(dx) <= 0x10000) && (abs(dy) <= 0x10000) && (abs(dz) <= 20))
-                A_BatAttack(ob, target);
+                BlitzBatAttack(ob, target);
             else
                 //resort to pistol to damage target
                 goto pistol;