mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-23 12:42:22 -04:00
Entity rotations work with players now
This commit is contained in:
parent
670449e4e1
commit
b428a54b9a
@ -51,12 +51,8 @@ namespace MCGalaxy.Commands.CPE {
|
||||
if (!ParseArgs(p, args, 1, ref prop, ref angle)) return;
|
||||
|
||||
Entities.UpdateEntityProp(who, prop, angle);
|
||||
/*if (model != "humanoid") {
|
||||
Server.models.AddOrReplace(who.name, model);
|
||||
} else {
|
||||
Server.models.Remove(who.name);
|
||||
}
|
||||
Server.models.Save();*/
|
||||
Server.rotations.AddOrReplace(who.name, who.Rot.RotX + " " + who.Rot.RotZ);
|
||||
Server.rotations.Save();
|
||||
}
|
||||
|
||||
static bool ParseArgs(Player p, string[] args, int i, ref EntityProp prop, ref int angle) {
|
||||
|
@ -176,12 +176,22 @@ namespace MCGalaxy {
|
||||
}
|
||||
|
||||
void LoadCpeData() {
|
||||
string savedSkin = Server.skins.FindData(name);
|
||||
if (savedSkin != null) SkinName = savedSkin;
|
||||
string skin = Server.skins.FindData(name);
|
||||
if (skin != null) SkinName = skin;
|
||||
|
||||
string savedModel = Server.models.FindData(name);
|
||||
if (savedModel != null) Model = savedModel;
|
||||
string model = Server.models.FindData(name);
|
||||
if (model != null) Model = model;
|
||||
ModelBB = AABB.ModelAABB(Model, level);
|
||||
|
||||
string rotations = Server.rotations.FindData(name);
|
||||
if (rotations == null) return;
|
||||
string[] rotParts = rotations.SplitSpaces(2);
|
||||
if (rotParts.Length != 2) return;
|
||||
|
||||
Orientation rot = Rot;
|
||||
byte.TryParse(rotParts[0], out rot.RotX);
|
||||
byte.TryParse(rotParts[1], out rot.RotZ);
|
||||
Rot = rot;
|
||||
}
|
||||
|
||||
void InitPlayerStats(DataTable playerDb) {
|
||||
@ -200,7 +210,7 @@ namespace MCGalaxy {
|
||||
muted = true;
|
||||
Chat.MessageGlobal(this, DisplayName + " &cis still muted from previously.", false);
|
||||
}
|
||||
|
||||
|
||||
if (Server.frozen.Contains(name)) {
|
||||
frozen = true;
|
||||
Chat.MessageGlobal(this, DisplayName + " &cis still frozen from previously.", false);
|
||||
|
@ -93,7 +93,7 @@ namespace MCGalaxy {
|
||||
public static CTFGame ctf = null;
|
||||
public static PlayerList bannedIP, whiteList, ircControllers, muted, invalidIds;
|
||||
public static PlayerList ignored, frozen, hidden, agreed, vip, noEmotes, lockdown;
|
||||
public static PlayerExtList jailed, models, skins, reach, tempBans;
|
||||
public static PlayerExtList jailed, models, skins, reach, tempBans, rotations;
|
||||
|
||||
public static readonly List<string> Devs = new List<string>(), Mods = new List<string>();
|
||||
|
||||
|
@ -72,6 +72,7 @@ namespace MCGalaxy {
|
||||
reach = PlayerExtList.Load("extra/reach.txt");
|
||||
invalidIds = PlayerList.Load("extra/invalidids.txt");
|
||||
tempBans = PlayerExtList.Load("text/tempbans.txt");
|
||||
rotations = PlayerExtList.Load("extra/rotations.txt");
|
||||
|
||||
if (useWhitelist)
|
||||
whiteList = PlayerList.Load("whitelist.txt");
|
||||
|
Loading…
x
Reference in New Issue
Block a user