mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-13 09:17:28 +07:00
alignment, comments
This commit is contained in:
@ -711,6 +711,7 @@ public class TypeIO{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void writeStatus(Writes write, StatusEntry entry){
|
public static void writeStatus(Writes write, StatusEntry entry){
|
||||||
|
//dynamic effects have the high bit of ID set to 1
|
||||||
write.s(entry.effect.id | (entry.effect.dynamic ? 1 << 15 : 0));
|
write.s(entry.effect.id | (entry.effect.dynamic ? 1 << 15 : 0));
|
||||||
write.f(entry.time);
|
write.f(entry.time);
|
||||||
|
|
||||||
@ -743,6 +744,7 @@ public class TypeIO{
|
|||||||
|
|
||||||
StatusEntry result = new StatusEntry();
|
StatusEntry result = new StatusEntry();
|
||||||
|
|
||||||
|
//check if it's dynamic (high bit set to 1), remove it, read multipliers
|
||||||
if((id & (1 << 15)) != 0){
|
if((id & (1 << 15)) != 0){
|
||||||
//it's a dynamic effect
|
//it's a dynamic effect
|
||||||
id ^= (1 << 15);
|
id ^= (1 << 15);
|
||||||
|
Reference in New Issue
Block a user