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;
|
if (!ParseArgs(p, args, 1, ref prop, ref angle)) return;
|
||||||
|
|
||||||
Entities.UpdateEntityProp(who, prop, angle);
|
Entities.UpdateEntityProp(who, prop, angle);
|
||||||
/*if (model != "humanoid") {
|
Server.rotations.AddOrReplace(who.name, who.Rot.RotX + " " + who.Rot.RotZ);
|
||||||
Server.models.AddOrReplace(who.name, model);
|
Server.rotations.Save();
|
||||||
} else {
|
|
||||||
Server.models.Remove(who.name);
|
|
||||||
}
|
|
||||||
Server.models.Save();*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool ParseArgs(Player p, string[] args, int i, ref EntityProp prop, ref int angle) {
|
static bool ParseArgs(Player p, string[] args, int i, ref EntityProp prop, ref int angle) {
|
||||||
|
@ -176,12 +176,22 @@ namespace MCGalaxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void LoadCpeData() {
|
void LoadCpeData() {
|
||||||
string savedSkin = Server.skins.FindData(name);
|
string skin = Server.skins.FindData(name);
|
||||||
if (savedSkin != null) SkinName = savedSkin;
|
if (skin != null) SkinName = skin;
|
||||||
|
|
||||||
string savedModel = Server.models.FindData(name);
|
string model = Server.models.FindData(name);
|
||||||
if (savedModel != null) Model = savedModel;
|
if (model != null) Model = model;
|
||||||
ModelBB = AABB.ModelAABB(Model, level);
|
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) {
|
void InitPlayerStats(DataTable playerDb) {
|
||||||
@ -200,7 +210,7 @@ namespace MCGalaxy {
|
|||||||
muted = true;
|
muted = true;
|
||||||
Chat.MessageGlobal(this, DisplayName + " &cis still muted from previously.", false);
|
Chat.MessageGlobal(this, DisplayName + " &cis still muted from previously.", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Server.frozen.Contains(name)) {
|
if (Server.frozen.Contains(name)) {
|
||||||
frozen = true;
|
frozen = true;
|
||||||
Chat.MessageGlobal(this, DisplayName + " &cis still frozen from previously.", false);
|
Chat.MessageGlobal(this, DisplayName + " &cis still frozen from previously.", false);
|
||||||
|
@ -93,7 +93,7 @@ namespace MCGalaxy {
|
|||||||
public static CTFGame ctf = null;
|
public static CTFGame ctf = null;
|
||||||
public static PlayerList bannedIP, whiteList, ircControllers, muted, invalidIds;
|
public static PlayerList bannedIP, whiteList, ircControllers, muted, invalidIds;
|
||||||
public static PlayerList ignored, frozen, hidden, agreed, vip, noEmotes, lockdown;
|
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>();
|
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");
|
reach = PlayerExtList.Load("extra/reach.txt");
|
||||||
invalidIds = PlayerList.Load("extra/invalidids.txt");
|
invalidIds = PlayerList.Load("extra/invalidids.txt");
|
||||||
tempBans = PlayerExtList.Load("text/tempbans.txt");
|
tempBans = PlayerExtList.Load("text/tempbans.txt");
|
||||||
|
rotations = PlayerExtList.Load("extra/rotations.txt");
|
||||||
|
|
||||||
if (useWhitelist)
|
if (useWhitelist)
|
||||||
whiteList = PlayerList.Load("whitelist.txt");
|
whiteList = PlayerList.Load("whitelist.txt");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user