Other players as real MSC characters
GameCharacter clones a MSC human (bodymesh + skeleton, no scripts, physics or animation), puts it into its bind pose, aligns and scales it, and drives the bones every frame from the joint points of the existing MSCO figure (hip, knee, ankle, shoulder, elbow, hand, head pitch, torso lean) by rotating each limb from its rest direction. Limb bones are picked geometrically, so bone naming conventions do not matter. Variant per player id; console 'model classic|game' switches, the MSCO figure is the automatic fallback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -211,6 +211,12 @@ namespace MSCO
|
||||
return lines;
|
||||
}
|
||||
|
||||
/// <summary>Konsole "model": Figuren neu bauen (kommen mit dem nächsten Spielerzustand wieder).</summary>
|
||||
public void RebuildAvatars()
|
||||
{
|
||||
foreach (PlayerInfo p in players.Values) DestroyAvatar(p);
|
||||
}
|
||||
|
||||
/// <summary>Konsole "vars <filter>": synchronisierte Fahrzeugwerte (Diagnose).</summary>
|
||||
public List<string> DescribeVehicleValues(string filter) { return vehicleState.Describe(filter, 60); }
|
||||
|
||||
@@ -2319,9 +2325,9 @@ namespace MSCO
|
||||
if (!players.TryGetValue(from, out p)) return;
|
||||
if (p.Avatar == null)
|
||||
{
|
||||
// Platzhalter-Figur: Kapsel mit Kopf und Hand
|
||||
// Echter MSC-Mensch (oder die eigene MSCO-Figur, wenn keiner passt / "model classic")
|
||||
p.Avatar = RemotePlayer.Create("MSCO_Player_" + from, PlayerColor(from), state, from);
|
||||
MscoLog.Info("[MSCO] " + p.Name + " is in the game");
|
||||
MscoLog.Info("[MSCO] " + p.Name + " is in the game (" + p.Avatar.ModelDescription + ")");
|
||||
}
|
||||
p.Avatar.SetTarget(state);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user