Commits

Rainer Hilmer  committed 24c3c54 Merge

Merge branch 'develop'

  • Participants
  • Parent commits d998ee3, 14e18d3
  • Tags V4.3.0

Comments (0)

Files changed (4)

File Havoc!/Havoc!.Guide/Doku.htm

    <h2>3. Features</h2>
    <p>You can adjust who of the three parties (peds, cops, drivers or any combination) will cause havoc 
       and you can set whether the player gets involved into the chaos. Even more you 
-      can tell whether you get hijacked with your car.</p>
+      can tell whether you get hijacked with your car.<br />
+      NEW since version 4.2.0: A hijacker can take you on a death ride in your 
+      vehicle. See section 6.3 for further information.<br />
+      NEW since vesion 4.3: The hijacker can also be used as your personal taxi 
+      driver. See section 6.4 for further information.</p>
    
    <h2>4. Installation</h2>
 
       Once you have persistent mad drivers you can show their current locations as 
       Blips in map view by pressing Shift+M.<br />
       NOTE: You can only have up to 20 persistent mad drivers. More could possibly 
-      cause memory issues and lead to a crash of the whole game.<br />
-      <span class="code_blue">Q: What happens if there are 20 mad drivers already and 
+      cause memory issues and lead to a crash of the whole game.</p>
+   <p><span class="code_blue">Q: What happens if there are 20 mad drivers already and 
       I press the StartHavoc key again?</span><br />
       <span class="code_comment">A: New drivers in your surrounding will always be 
          transformed to mad drivers (if the MadDrivers tag is set to true of course) but 
       H.<br />
       Your player character will teleport onto a passenger seat, a driver will appear 
       and start the death ride. The speed and behavior is taken from the mad driver 
-      settings.<br />
-      <span class="code_blue">Q: What if the vehicle I currently sit in has no 
+      settings.</p>
+   <p><span class="code_blue">Q: What if the vehicle I currently sit in has no 
       passenger seat(s)?</span><br />
       <span class="code_comment">A: You won&#39;t get hijacked.</span><br />
       <br />
       brakes and leave.<br />
       I know this is no real hijacking that way but hey, this mod is just for having 
       fun anyway. ;-)</span></p>
+   <h3>6.4 Your pesonal taxi driver</h3>
+   <p>Some people wished for this feature in my PTS mod. The scope of PTS, however, is 
+      different so I implemented this feature here. You already get a hijacker so he 
+      can drive you in a reasonable manner as well. This feature is new since version 
+      4.3.0.<br />
+      Here is how to get your personal taxi driver:<br />
+      Just set a waypoint as usual, be in any vehicle and press H. The driver will now 
+      be a taxi driver who gets you to the desired destination. You can set the 
+      driver&#39;s speed and driving style with the help of the simple trainer (
+      <a href="http://www.gta4-mods.com/script/simple-trainer-version-65-f2115">
+      http://www.gta4-mods.com/script/simple-trainer-version-65-f2115</a> ). Open the 
+      menu by pressing F3, then go to &quot;Bodyguard/Ped spawning&quot; -&gt; &quot;Set drive options&quot;.<br />
+      Once you have reached the destination the driver will stop and leave and you are 
+      warped back on the driver seat.</p>
+   <p><span class="code_blue">Q: What happens if I change the waypoint during our 
+      ride?</span><br />
+      <span class="code_comment">A: The mod recognizes it and sets it as the new 
+      destination.</span></p>
+   <p><span class="code_blue">Q: How can I get rid of the taxi driver/hijacker in the 
+      middle of the ride?</span><br />
+      <span class="code_comment">A: Just press H and you will immediately get the 
+      control over the vehicle back.</span></p>
    <h2>7. Configuration</h2>
    <p>When you have correctly installed everything there should be the following 
       folder structure in your documents folder:<br />
       to fight each other! In case you have set the InvolvePlayer tag to true some 
       peds will also attack <span class="auto-style1">you</span>!</p>
    <h2>8. Keyboard Quick Reference</h2>
-   <p><table border="1" class="auto-style7">
+   <table border="1" class="auto-style7">
          <tr>
             <td class="auto-style8"><b>Action</b></td>
             <td><b>Hotkey</b></td>
             <td>R</td>
          </tr>
          <tr>
-            <td class="auto-style8">Get hijacked (you need to be in a vehicle)</td>
+            <td class="auto-style8">Toggle hijacker (you need to be in a vehicle)</td>
             <td>H</td>
          </tr>
          <tr>
-            <td class="auto-style8">Stop being hijacked</td>
+            <td class="auto-style8">Toggle taxi driver  (you need to be in a vehicle and a 
+               waypoint must be set)</td>
             <td>H</td>
          </tr>
-      </table></p>
+      </table>
 </body>
 </html>

File Havoc!/Havoc!/HijackerHandling.cs

 
       internal void BailOut()
       {
-         if(!HijackerActivated)
+         if (!HijackerActivated)
             return;
-         if(_hijackerIsRouting)
+         if (_hijackerIsRouting)
          {
             _hijackerIsRouting = false;
             if (CommonFunctions.PedExists(_driver))
       /// </summary>
       internal void StopHijackerIfPlayerLeftVehicle()
       {
-         if(Player.Character.isInVehicle() || !HijackerActivated)
+         if (Player.Character.isInVehicle() || !HijackerActivated)
             return;
-         if(_currentVehicle == null)
+         if (_currentVehicle == null)
          {
             CommonFunctions.DisplayText("currentVehicle is null.", 3000);
             return;
 
       internal void StopHijackerIfTargetReached()
       {
-         if(!_hijackerIsRouting || !CommonFunctions.VehicleExists(_currentVehicle))
+         if (!_hijackerIsRouting || !CommonFunctions.VehicleExists(_currentVehicle))
             return;
          if (_currentVehicle.Position.NewDistanceTo2D(_waypointTarget) < 10.0f)
             DriverStopVehicleAndLeave();
       }
-      
+
       internal void TriggerHijacker()
       {
          if (!Player.Character.isSittingInVehicle()
          HijackerActivated = true;
       }
 
-      private void HijackerDriveToWaypoint()
+      internal void UpdateTarget()
       {
-         _driver.Task.DriveTo(_waypointTarget,
-            CommonFunctions.CorrectedSpeed(_core.Configuration.MadDriversSpeed),
-            _core.Configuration.MadDriversObeyTrafficLaws);
+         var waypoint = Game.GetWaypoint();
+         if (waypoint == null)
+            return;
+         var tempTarget = waypoint.Position;
+         if (_waypointTarget == default(Vector3))
+            _waypointTarget = tempTarget;
+         if (_waypointTarget != tempTarget)
+         {
+            _waypointTarget = tempTarget;
+            if (!CommonFunctions.PedExists(_driver))
+               return;
+            _driver.Task.ClearAll();
+            HijackerDriveToWaypoint();
+         }
       }
 
       private void DriverStopVehicleAndLeave()
          _hijackerIsRouting = false;
          Game.LoadAllPathNodes = false;
          HijackerActivated = false;
+         WarpPlayerBackToDriverSeatOnceFree();
+      }
+
+      private void HijackerDriveToWaypoint()
+      {
+         _driver.Task.DriveTo(_waypointTarget,
+            CommonFunctions.CorrectedSpeed(_core.Configuration.MadDriversSpeed),
+            _core.Configuration.MadDriversObeyTrafficLaws);
       }
 
       private void WaitForVehicleToStop()
             Wait(Interval);
       }
 
-      internal void UpdateTarget()
+      private void WarpPlayerBackToDriverSeatOnceFree()
       {
-         var waypoint = Game.GetWaypoint();
-         if (waypoint == null)
+         if (!CommonFunctions.VehicleExists(_currentVehicle)
+             || !CommonFunctions.PedExists(Player.Character))
             return;
-         var tempTarget = waypoint.Position;
-         if (_waypointTarget == default(Vector3))
-            _waypointTarget = tempTarget;
-         if (_waypointTarget != tempTarget)
-         {
-            _waypointTarget = tempTarget;
-            if (!CommonFunctions.PedExists(_driver))
-               return;
-            _driver.Task.ClearAll();
-            HijackerDriveToWaypoint();
-         }
+         while (!_currentVehicle.isSeatFree(VehicleSeat.Driver))
+            Wait(Interval);
+         Player.Character.WarpIntoVehicle(_currentVehicle, VehicleSeat.Driver);
       }
    }
 }

File Havoc!/Havoc!/Properties/AssemblyInfo.cs

 // You can specify all the values or you can default the Build and Revision Numbers 
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("4.2.4.*")]
+[assembly: AssemblyVersion("4.3.0.*")]
 //[assembly: AssemblyFileVersion("1.0.0.0")]
 [assembly: InternalsVisibleTo("Havoc.Tests")]

File Havoc!/Havoc!/bin/x86/Release/Havoc!.net.dll

Binary file modified.