Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
the_dungeon_project
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
12
Issues
12
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
genie_logiciel_2015
the_dungeon_project
Commits
aa403564
Commit
aa403564
authored
Jan 02, 2016
by
Lucas Delcros
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Temporary solution to spawning in lava bug : the player spawns in the upper left corner
parent
45ab6380
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/map_generation/map/SurfacesMapGeneration.java
src/map_generation/map/SurfacesMapGeneration.java
+4
-4
No files found.
src/map_generation/map/SurfacesMapGeneration.java
View file @
aa403564
...
...
@@ -31,10 +31,10 @@ public class SurfacesMapGeneration implements Serializable{
private
static
MapPoint
defineStartPosition
(
Surface
[]
rooms
)
{
Random
r
=
new
Random
();
int
idRoom
=
r
.
nextInt
(
rooms
.
length
);
int
posY
=(
rooms
[
idRoom
].
j1
+
rooms
[
idRoom
].
j2
)/
2
;
int
posX
=(
rooms
[
idRoom
].
i1
+
rooms
[
idRoom
].
i2
)/
2
;
// int posX = rooms[idRoom].j
1;
// int posY = rooms[idRoom].i
1;
//
int posY=(rooms[idRoom].j1+rooms[idRoom].j2)/2;
//
int posX=(rooms[idRoom].i1+rooms[idRoom].i2)/2;
int
posX
=
rooms
[
idRoom
].
i
1
;
int
posY
=
rooms
[
idRoom
].
j
1
;
MapPoint
startPosition
=
new
MapPoint
(
posY
,
posX
);
return
startPosition
;
}
...
...
Write
Preview
Markdown
is supported
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