evtl fix expired object

This commit is contained in:
hydrant
2021-05-09 23:37:40 +02:00
parent 67976f55fe
commit b9c21a8e7e

View File

@@ -4,6 +4,7 @@ import game from "../..";
class RageEntity implements IEntity {
private entity: EntityMp;
private entityType: string;
public __attachments: any[];
public __attachmentObjects: any[];
@@ -16,7 +17,7 @@ class RageEntity implements IEntity {
}
exists() {
switch (this.entity.type) {
switch (this.entityType) {
case "player":
return mp.players.exists(this.entity as PlayerMp);
case "vehicle":
@@ -45,6 +46,7 @@ class RageEntity implements IEntity {
constructor(entity: EntityMp) {
this.entity = entity;
this.entityType = this.entity.type;
}
get type(): EntityType {