Skip to content

Commit

Permalink
Renamed the old AttackSystem.java to WeaponsSystem.java, to better re…
Browse files Browse the repository at this point in the history
…flect the categorization of "actions, toggles and weapons"
  • Loading branch information
assofohdz committed Jan 15, 2023
1 parent 0a2749c commit c54e10b
Show file tree
Hide file tree
Showing 5 changed files with 713 additions and 662 deletions.
10 changes: 5 additions & 5 deletions infinity/src/main/java/infinity/client/AvatarMovementState.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import infinity.es.input.MovementInput;
import infinity.net.GameSession;
import infinity.systems.ActionSystem;
import infinity.systems.AttackSystem;
import infinity.systems.WeaponsSystem;
import infinity.systems.AvatarSystem;

/**
Expand Down Expand Up @@ -218,13 +218,13 @@ public void valueChanged(final FunctionId func, final InputState value, final do
if (value == InputState.Off) {
// Attack functions first:
if (func == AvatarMovementFunctions.F_SHOOT) {
session.attack(AttackSystem.GUN);
session.attack(WeaponsSystem.GUN);
} else if (func == AvatarMovementFunctions.F_BOMB) {
session.attack(AttackSystem.BOMB);
session.attack(WeaponsSystem.BOMB);
} else if (func == AvatarMovementFunctions.F_GRAVBOMB) {
session.attack(AttackSystem.GRAVBOMB);
session.attack(WeaponsSystem.GRAVBOMB);
} else if (func == AvatarMovementFunctions.F_MINE) {
session.attack(AttackSystem.MINE);
session.attack(WeaponsSystem.MINE);
// <..
// Actions-->
} else if (func == AvatarMovementFunctions.F_THOR) {
Expand Down
2 changes: 1 addition & 1 deletion infinity/src/main/java/infinity/server/GameServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ public long getTime() {

systems.register(MobSystem.class, new MobSystem());

systems.register(AttackSystem.class, new AttackSystem());
systems.register(WeaponsSystem.class, new WeaponsSystem());
systems.register(ArenaSystem.class, new ArenaSystem());
systems.register(PrizeSystem.class, new PrizeSystem(mphys.getPhysicsSpace()));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,15 +199,15 @@ private class GameSessionImpl implements GameSession {
// private PlayerDriver driver;
private final EntityId playerEntityId;
// private final BinIndex binIndex;
private final AttackSystem attackSystem;
private final WeaponsSystem attackSystem;
// private MapSystem mapSystem;

public GameSessionImpl(final HostedConnection conn) {
this.conn = conn;

phys = gameSystems.get(PhysicsSpace.class, true);
// mphys = gameSystems.get(MPhysSystem.class, true);
attackSystem = gameSystems.get(AttackSystem.class, true);
attackSystem = gameSystems.get(WeaponsSystem.class, true);
// this.mapSystem = gameSystems.get(MapSystem.class, true);

// binIndex = phys.getBinIndex();
Expand Down
Loading

0 comments on commit c54e10b

Please sign in to comment.