diff --git a/client/src/scripts/objects/loot.ts b/client/src/scripts/objects/loot.ts index c2eecdd5f..1fed96573 100644 --- a/client/src/scripts/objects/loot.ts +++ b/client/src/scripts/objects/loot.ts @@ -112,12 +112,12 @@ export class Loot extends GameObject { // Play an animation if this is new loot if (data.full.isNew && isNew) { - this.container.scale.set(0.5); + this.container.scale.set(0); this.animation = this.game.addTween({ target: this.container.scale, to: { x: 1, y: 1 }, - duration: 1000, - ease: EaseFunctions.elasticOut, + duration: 700, + ease: EaseFunctions.quadraticOut, onComplete: () => { this.animation = undefined; } diff --git a/common/src/constants.ts b/common/src/constants.ts index ee70fafea..16ac89834 100644 --- a/common/src/constants.ts +++ b/common/src/constants.ts @@ -155,8 +155,9 @@ export const GameConstants = freezeDeep({ killLeaderMinKills: 3, maxMouseDist: 128, reviveTime: 8, - maxReviveDist: 5 + maxReviveDist: 5, }, + lootSpawnDistance:.7, airdrop: { fallTime: 8000, flyTime: 30000, diff --git a/server/src/game.ts b/server/src/game.ts index b23909794..4e2beb6a8 100644 --- a/server/src/game.ts +++ b/server/src/game.ts @@ -16,7 +16,7 @@ import { CircleHitbox } from "../../common/src/utils/hitbox"; import { EaseFunctions, Geometry, Numeric } from "../../common/src/utils/math"; import { Timeout } from "../../common/src/utils/misc"; import { ItemType, MapObjectSpawnMode, type ReferenceTo, type ReifiableDef } from "../../common/src/utils/objectDefinitions"; -import { pickRandomInArray, randomFloat, randomPointInsideCircle, randomRotation } from "../../common/src/utils/random"; +import { pickRandomInArray, randomFloat, randomPointInsideCircle, randomRotation, randomVector } from "../../common/src/utils/random"; import { OBJECT_ID_BITS, SuroiBitStream } from "../../common/src/utils/suroiBitStream"; import { Vec, type Vector } from "../../common/src/utils/vector"; import { Config, SpawnMode } from "./config"; @@ -815,10 +815,9 @@ export class Game { const loot = new Loot( this, definition, - position, + Vec.add(position,randomVector(-GameConstants.lootSpawnDistance,GameConstants.lootSpawnDistance,-GameConstants.lootSpawnDistance,GameConstants.lootSpawnDistance)), count ); - this.grid.addObject(loot); return loot; } diff --git a/server/src/objects/loot.ts b/server/src/objects/loot.ts index fd66a4741..9fd8a3746 100644 --- a/server/src/objects/loot.ts +++ b/server/src/objects/loot.ts @@ -39,7 +39,7 @@ export class Loot extends BaseGameObject { * * This particular exponent results in a 10% loss every 28.55ms (or a 50% loss every 187.8ms) */ - private static readonly _dragConstant = Math.exp(-3.69 / GameConstants.tickrate); + private static readonly _dragConstant = Math.exp(-4 / GameConstants.tickrate); constructor(game: Game, definition: ReifiableDef, position: Vector, count?: number) { super(game, position);