Implement source-backed Scooter vehicle in tutorial and outside
This commit is contained in:
1 parent
8df5e81070
commit
62c07a3d59
44 files changed
+3135
-174
No files matched your search
@@ -81,7 +81,7 @@ public sealed class SceneInteractions
|
||||
{
|
||||
if (!float.IsFinite(activePlayerRoot.X + activePlayerRoot.Y + activePlayerRoot.Z)
|
||||
|| !float.IsFinite(playerRadius) || playerRadius < 0) throw new ArgumentOutOfRangeException(nameof(activePlayerRoot));
|
||||
bool VehicleControlled()=>vehicle is{Kind:"3ROC"}&&director.AuthoredControlledTag==vehicle.Tag;
|
||||
bool VehicleControlled()=>vehicle is{Kind:"3ROC" or "3JEE"}&&director.AuthoredControlledTag==vehicle.Tag;
|
||||
bool Controlled()=>director.Controlled||VehicleControlled();
|
||||
if (!Controlled()) return;
|
||||
HideCollected();
|
||||
@@ -97,9 +97,9 @@ public sealed class SceneInteractions
|
||||
if (!director.Controlled) break;
|
||||
}
|
||||
// Carl InitObject413E2F..45 sets radius100 and support factor0.75.
|
||||
//435D08 pickups require the raw controlled ship.457EE6 LOAD requires
|
||||
//435D08 pickups require the raw controlled actor.457EE6 LOAD requires
|
||||
//the real Jimmy passenger; the coincident actors keep distinct radii.
|
||||
var contactRadius=source.Kind=="3PIC"&&VehicleControlled()?50:playerRadius;
|
||||
var contactRadius=source.Kind=="3PIC"&&VehicleControlled()?(vehicle!.Kind=="3JEE"?150:50):playerRadius;
|
||||
var radius = contactRadius + (source.Kind == "3TRO" ? 20 : source.Kind == "3CAR" ? 100 : source.Number("Radius"));
|
||||
var overlaps = actor.Active && (source.Kind!="3TRO" || actor.BodyEnabled)
|
||||
&& OriginalBodySupport.QuickMagnitude(activePlayerRoot - actor.Position) < radius;
|
||||
|
||||
Reference in new issue
Block a user