What features do you think are missing from GLua?

Is there any particular feature that you feel has been left out of GLua that you think needs to be included? If so, what are the steps a developer needs to include it? If we can brainstorm some good ideas here, garry, Azu, and all the other module developers will be much more able to help.

This is not a thread for bugfixes, that’s the Update thread. This thread is specifically for features that have not been implemented that could possibly be implemented through .dll modules or by garry/Azu.

It would be great if we had all bitwise operators by default. Not really a GMod specific thing, but it would be quite useful.

Vector:__unm ( if not already implemented )

Entity:SetDSP( dsp ) ( affects all sounds emitted from entity, different from Player:SetDSP )
Entity:EmitSound( path, vol, pitch, dsp )
surface.PlaySound( path, dsp )
surface.SetDSP( dsp )
CSoundPatch:SetDSP( dsp )
Player:SetVoiceVolume( float )
Player:SetChannelDSP( chan, dsp )

The only way I can think of to set the dsp of a specific sound being emitted requires an ambient_generic to be created to set the dsp property.

chan would be something like CHAN_EMIT, CHAN_VOICE, CHAN_SURFACE.

I’m really interested in the last one - the ability to apply dsp to the player’s voice, and only their voice, would be awesome, for example.

It’s honestly the feature I want the absolute most.

Client-side constraint library.

How would that help? :v:

Welding client-side props?:v:

I don’t think there’s even clientside physics.

PhysObj.GetIntertia (That returns a number for use with queryphys)

There are, you can spawn prop_physics client-side.

Don’t they have no physics? Or so I thought :ohdear:

It doesn’t have physics though.

Does too, what are you talking about?:saddowns: What about ragdolls when you die?

They do if you use :PhysicsInit() on them.

Of course clientside has physics, or prediction wouldn’t work.

What I would like to see is an entity hook that controls to what players (if any) network messages should be sent to. So suppose I change the position of the entity every frame (ent.SetPos), I can use the hook to stop that being networked out.

What would you use that for? Wouldn’t it cause massive prediction errors when players try to interact with it? The position is updated naturally whether you use SetPos on it or not.

Technically you can use gm_sourcenet and its SendNetMsg hook.

Suppose I wanted to predict position clientside, and I am 100% sure my code will get it right. Sending the position to the client every frame is very wasteful.

Yeah, clientside constraints. I desperately need clientside ballsockets for ragdoll pinning purposes. Freezing bones just doesn’t look right. :saddowns:

A function for toggling IK on playermodels would really come in handy as well, because some of them just don’t animate properly without it.

More specific purposes, but I’d appreciate an implementation of clientside scenes, so that they can be played on any entity (I personally need them for TF2 playermodels, but it would be quite useful for some kind of in-game scene selector).
Somehow TF2 related as well, a function for loading phonemes. CBaseFlex::FindSceneFile(const char *filename) seems to be it, although I’m not sure. It would fix TF2 models not moving their lips when talking.

Garry also told me a while ago that he would try to implement a hook for overriding what a material proxy should return depending on a given context. I really need that as well because TF2 cloaking and übercharging will never ever look right without them.

Also, some way to register activities which don’t have a value by default would be useful, especially since Weapon:SendWeaponAnim only takes an activity, not a sequence. Looks like what ActivityList_RegisterPrivateActivity(const char *pszActivityName) does, it’s from shared/activitylist.h, takes an activity name, registers it, returns an integer. That’s already kind of possible with GetSequenceActivity, but rather hacky and not very reliable.

I guess that’s what I get for wanting to remake Team Fortress 2 in Lua, I keep running into a bunch of dead ends because of engine functions that I need which aren’t implemented. :ohdear:

Clientside constraints would be interesting.

Do want.