MCPcopy Create free account
hub / github.com/20tab/UnrealEnginePython / py_ue_jump

Function py_ue_jump

Source/UnrealEnginePython/Private/UEPyMovements.cpp:142–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142PyObject *py_ue_jump(ue_PyUObject *self, PyObject * args) {
143
144 ue_py_check(self);
145
146 ACharacter *character = nullptr;
147
148 if (self->ue_object->IsA<ACharacter>()) {
149 character = (ACharacter *)self->ue_object;
150 }
151 else if (self->ue_object->IsA<UActorComponent>()) {
152 UActorComponent *component = (UActorComponent *)self->ue_object;
153 AActor *actor = component->GetOwner();
154 if (actor) {
155 if (actor->IsA<ACharacter>()) {
156 character = (ACharacter *)actor;
157 }
158 }
159 }
160
161 if (!character)
162 return PyErr_Format(PyExc_Exception, "uobject is not a character");
163
164 character->Jump();
165
166 Py_INCREF(Py_None);
167 return Py_None;
168}
169
170PyObject *py_ue_crouch(ue_PyUObject *self, PyObject * args) {
171

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected