Page MenuHomeFeedback Tracker

ENTITY getModelInfo INDEX
Closed, ResolvedPublic

Description

I'd like to request alt syntax for getModelInfo so you can only get single data that you need instead of wide array, similar to getEntityInfo and getShotInfo alt syntaxes.

ANY = ENTITY getModelInfo INDEX

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Scripting

Event Timeline

SaMatra created this task.Apr 6 2024, 11:31 AM
dedmen added a subscriber: dedmen.EditedApr 24 2024, 12:00 PM

I don't see the need to spam commands for every place where this pattern appears.
I'd rather improve the performance of getModelInfo instead.

Command return is very different in nature - model name string, skeleton boolean, placing point vector, mass number. Pretty sure in 99.9% cases you'll only ever use a single value (like I do in all my usages), thus the suggestion to have it return only wanted value. I don't REALLY need it but it would be nice to have.

getModelInfo player
0.000409759
0.000415021
0.000424912

getModelInfo2 player
0.000364277
0.000363895
0.000362612

getEntityInfo player
0.000326406
0.000328084
0.000329488

getEntityInfo2 player
0.000295228
0.000298869
0.000290917

I atleast made it a little faster.

Nice. I guess its fine with closing the ticket until there somebody has a really big need for single-return syntax.

Leopard20 closed this task as Resolved.Apr 24 2024, 7:19 PM
Leopard20 claimed this task.