Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genie_logiciel_2015
the_dungeon_project
Commits
fdbc12dd
Commit
fdbc12dd
authored
Jan 04, 2016
by
Toussaint Etienne
Browse files
Fix my mistakes / Hitboxed repatched
parent
dccc6beb
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/core/event/AbilityEvent.java
View file @
fdbc12dd
...
...
@@ -55,7 +55,8 @@ public class AbilityEvent implements ClientEvent,ServerEvent {
}
return
true
;
}
catch
(
EntityNotFoundExeption
entityNotFoundExeption
)
{
return
true
;
entityNotFoundExeption
.
printStackTrace
();
return
false
;
}
}
...
...
src/core/event/AddedTriggerEvent.java
View file @
fdbc12dd
...
...
@@ -16,6 +16,7 @@ public class AddedTriggerEvent implements ClientEvent{
try
{
e
=
gameContent
.
getGameState
().
getEntity
(
targetID
);
}
catch
(
EntityNotFoundExeption
entityNotFoundExeption
)
{
entityNotFoundExeption
.
printStackTrace
();
return
false
;
}
if
(
e
.
addTriggers
(
trigger
)){
...
...
src/core/event/RemovedTriggerEvent.java
View file @
fdbc12dd
...
...
@@ -15,6 +15,7 @@ public class RemovedTriggerEvent implements ClientEvent{
try
{
e
=
gameContent
.
getGameState
().
getEntity
(
targetID
);
}
catch
(
EntityNotFoundExeption
entityNotFoundExeption
)
{
entityNotFoundExeption
.
printStackTrace
();
return
false
;
}
if
(
e
.
removeTriggers
(
triggerID
)){
...
...
src/core/gamestate/Entity.java
View file @
fdbc12dd
...
...
@@ -338,7 +338,8 @@ public class Entity implements Serializable{
* @param gameState
*/
boolean
hackGamestate
(
GameState
gameState
)
{
throw
new
IllegalStateException
(
"The gamestate doesn't know the given subclass"
);
//throw new IllegalStateException("The gamestate doesn't know the given subclass");
return
gameState
.
addEntityBis
(
this
);
}
public
void
checkTrigger
(
GameContent
gameContent
,
NetworkConnection
<
NetworkObject
>
networkConnection
)
{
...
...
src/core/gamestate/GameState.java
View file @
fdbc12dd
...
...
@@ -52,7 +52,11 @@ public class GameState implements Serializable{
* @return true if it was added, false otherwise.
*/
public
boolean
addEntity
(
Entity
entity
){
//return entity.hackGamestate(this);
return
entity
.
hackGamestate
(
this
);
//return entities.add(entity);
}
public
boolean
addEntityBis
(
Entity
entity
)
{
return
entities
.
add
(
entity
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment