mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-18 04:20:19 -07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
08e9b4853a
2 changed files with 44 additions and 24 deletions
|
|
@ -18,13 +18,35 @@ public enum FacialExpression {
|
|||
//Chat heads from oldschool 2009scape?
|
||||
//Maybe for gnomes or dwarves? Chat heads are frozen when used on Human NPCs
|
||||
OLD_HAPPY(588),
|
||||
OLD_CALM_TALK1(589),
|
||||
OLD_CALM_TALK2(590),
|
||||
OLD_DEFAULT(591),
|
||||
OLD_EVIL1(592),
|
||||
OLD_EVIL2(593),
|
||||
OLD_NORMAL(594),
|
||||
OLD_SNEAKY(595),
|
||||
OLD_SAD(596),
|
||||
OLD_DISTRESSED(596),
|
||||
OLD_DISTRESSED2(597),
|
||||
OLD_ALMOST_CRYING(598),
|
||||
OLD_BOWS_HEAD_SAD(599),
|
||||
OLD_DRUNK_LEFT(600),
|
||||
OLD_DRUNK_RIGHT(601),
|
||||
OLD_NOT_INTERESTED(602),
|
||||
OLD_SLEEPY(603),
|
||||
OLD_PLAIN_EVIL(604),
|
||||
OLD_LAUGH1(605),
|
||||
OLD_LAUGH2(606),
|
||||
OLD_LAUGH3(607),
|
||||
OLD_LAUGH4(608), //TODO: More
|
||||
OLD_LAUGH4(608),
|
||||
OLD_EVIL_LAUGH(609),
|
||||
OLD_SAD(610),
|
||||
OLD_MORE_SAD(611),
|
||||
OLD_ON_ONE_HAND(612),
|
||||
OLD_NEARLY_CRYING(613),
|
||||
OLD_ANGRY1(614),
|
||||
OLD_ANGRY2(615),
|
||||
OLD_ANGRY3(616),
|
||||
OLD_ANGRY4(617),
|
||||
|
||||
//Chatheads from 2009?
|
||||
NOD_YES(9741),
|
||||
|
|
|
|||
|
|
@ -22,31 +22,29 @@ object MapChunkRenderer {
|
|||
val last = player.playerFlags.lastViewport
|
||||
val updated: MutableList<RegionChunk> = ArrayList()
|
||||
val current = v.chunks
|
||||
if (!Arrays.equals(current, last)) { //don't update if the viewport hasn't changed
|
||||
var sizeX = last.size
|
||||
for (x in 0 until sizeX) {
|
||||
val sizeY: Int = last[x].size
|
||||
for (y in 0 until sizeY) {
|
||||
val previous = last[x][y] ?: continue
|
||||
if (!containsChunk(current, previous)) {
|
||||
PacketRepository.send(ClearRegionChunk::class.java, ClearChunkContext(player, previous))
|
||||
} else {
|
||||
updated.add(previous)
|
||||
}
|
||||
var sizeX = last.size
|
||||
for (x in 0 until sizeX) {
|
||||
val sizeY: Int = last[x].size
|
||||
for (y in 0 until sizeY) {
|
||||
val previous = last[x][y] ?: continue
|
||||
if (!containsChunk(current, previous)) {
|
||||
PacketRepository.send(ClearRegionChunk::class.java, ClearChunkContext(player, previous))
|
||||
} else {
|
||||
updated.add(previous)
|
||||
}
|
||||
}
|
||||
sizeX = current.size
|
||||
for (x in 0 until sizeX) {
|
||||
val sizeY: Int = current[x].size
|
||||
for (y in 0 until sizeY) {
|
||||
val chunk = current[x][y]
|
||||
if (!updated.contains(chunk)) {
|
||||
chunk.synchronize(player)
|
||||
} else {
|
||||
chunk.update(player)
|
||||
}
|
||||
last[x][y] = current[x][y]
|
||||
}
|
||||
sizeX = current.size
|
||||
for (x in 0 until sizeX) {
|
||||
val sizeY: Int = current[x].size
|
||||
for (y in 0 until sizeY) {
|
||||
val chunk = current[x][y]
|
||||
if (!updated.contains(chunk)) {
|
||||
chunk.synchronize(player)
|
||||
} else {
|
||||
chunk.update(player)
|
||||
}
|
||||
last[x][y] = current[x][y]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue