evtl fix expired object
This commit is contained in:
@@ -4,6 +4,7 @@ import game from "../..";
|
|||||||
|
|
||||||
class RageEntity implements IEntity {
|
class RageEntity implements IEntity {
|
||||||
private entity: EntityMp;
|
private entity: EntityMp;
|
||||||
|
private entityType: string;
|
||||||
public __attachments: any[];
|
public __attachments: any[];
|
||||||
public __attachmentObjects: any[];
|
public __attachmentObjects: any[];
|
||||||
|
|
||||||
@@ -16,7 +17,7 @@ class RageEntity implements IEntity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
exists() {
|
exists() {
|
||||||
switch (this.entity.type) {
|
switch (this.entityType) {
|
||||||
case "player":
|
case "player":
|
||||||
return mp.players.exists(this.entity as PlayerMp);
|
return mp.players.exists(this.entity as PlayerMp);
|
||||||
case "vehicle":
|
case "vehicle":
|
||||||
@@ -45,6 +46,7 @@ class RageEntity implements IEntity {
|
|||||||
|
|
||||||
constructor(entity: EntityMp) {
|
constructor(entity: EntityMp) {
|
||||||
this.entity = entity;
|
this.entity = entity;
|
||||||
|
this.entityType = this.entity.type;
|
||||||
}
|
}
|
||||||
|
|
||||||
get type(): EntityType {
|
get type(): EntityType {
|
||||||
|
|||||||
Reference in New Issue
Block a user